mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
updated guide section heights and added a debug message to track height usage
This commit is contained in:
parent
219f02b188
commit
9fe0669fda
@ -182,7 +182,7 @@ local function main()
|
|||||||
renderer.close_ui()
|
renderer.close_ui()
|
||||||
|
|
||||||
if not pkt_state.ui_ok then
|
if not pkt_state.ui_ok then
|
||||||
println(util.c("App crashed with error: ", pkt_state.ui_error))
|
println(util.c("UI crashed with error: ", pkt_state.ui_error))
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
println_ts("UI creation failed")
|
println_ts("UI creation failed")
|
||||||
|
@ -185,9 +185,9 @@ local function new_view(root)
|
|||||||
TextBox{parent=annunc_div,y=1,text="Annunciators",height=1,alignment=ALIGN.CENTER}
|
TextBox{parent=annunc_div,y=1,text="Annunciators",height=1,alignment=ALIGN.CENTER}
|
||||||
PushButton{parent=annunc_div,x=2,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=uis_page.nav_to}
|
PushButton{parent=annunc_div,x=2,y=1,text="<",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=uis_page.nav_to}
|
||||||
|
|
||||||
local unit_gen_page = guide_section(sect_construct_data, annunc_page, "Unit General", docs.annunc.unit.main_section, 200)
|
local unit_gen_page = guide_section(sect_construct_data, annunc_page, "Unit General", docs.annunc.unit.main_section, 170)
|
||||||
local unit_rps_page = guide_section(sect_construct_data, annunc_page, "Unit RPS", docs.annunc.unit.rps_section, 100)
|
local unit_rps_page = guide_section(sect_construct_data, annunc_page, "Unit RPS", docs.annunc.unit.rps_section, 100)
|
||||||
local unit_rcs_page = guide_section(sect_construct_data, annunc_page, "Unit RCS", docs.annunc.unit.rcs_section, 100)
|
local unit_rcs_page = guide_section(sect_construct_data, annunc_page, "Unit RCS", docs.annunc.unit.rcs_section, 170)
|
||||||
|
|
||||||
PushButton{parent=annunc_div,y=3,text="Unit General >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=unit_gen_page.nav_to}
|
PushButton{parent=annunc_div,y=3,text="Unit General >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=unit_gen_page.nav_to}
|
||||||
PushButton{parent=annunc_div,text="Unit RPS >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=unit_rps_page.nav_to}
|
PushButton{parent=annunc_div,text="Unit RPS >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=unit_rps_page.nav_to}
|
||||||
|
@ -1,3 +1,4 @@
|
|||||||
|
local log = require("scada-common.log")
|
||||||
local util = require("scada-common.util")
|
local util = require("scada-common.util")
|
||||||
|
|
||||||
local core = require("graphics.core")
|
local core = require("graphics.core")
|
||||||
@ -57,8 +58,11 @@ return function (data, base_page, title, items, scroll_height)
|
|||||||
PushButton{parent=name_list,text=item.name,alignment=ALIGN.LEFT,fg_bg=cpair(colors.blue,colors.black),active_fg_bg=btn_active,callback=view}
|
PushButton{parent=name_list,text=item.name,alignment=ALIGN.LEFT,fg_bg=cpair(colors.blue,colors.black),active_fg_bg=btn_active,callback=view}
|
||||||
|
|
||||||
if i % 12 == 0 then util.nop() end
|
if i % 12 == 0 then util.nop() end
|
||||||
|
|
||||||
end
|
end
|
||||||
|
|
||||||
|
log.debug("guide section " .. title .. " generated with final height ".. _end.get_y())
|
||||||
|
|
||||||
util.nop()
|
util.nop()
|
||||||
|
|
||||||
return section_page
|
return section_page
|
||||||
|
Loading…
Reference in New Issue
Block a user