mirror of
https://github.com/MikaylaFischler/cc-mek-scada.git
synced 2024-08-30 18:22:34 +00:00
#403 guide fixes and focusing improvements
This commit is contained in:
parent
9404b50a8c
commit
e37b8758cd
@ -143,40 +143,46 @@ local function new_view(root)
|
|||||||
PushButton{parent=gls,y=3,text="Abbreviations >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_abb_page.nav_to}
|
PushButton{parent=gls,y=3,text="Abbreviations >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_abb_page.nav_to}
|
||||||
PushButton{parent=gls,text="Terminology >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_term_page.nav_to}
|
PushButton{parent=gls,text="Terminology >",fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=gls_term_page.nav_to}
|
||||||
|
|
||||||
local abb_name_list = ListBox{parent=gls_abb_div,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
local abb_name_list = ListBox{parent=gls_abb_div,x=1,y=3,scroll_height=20,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||||
local abb_def_list = ListBox{parent=gls_abb_view_div,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
local abb_def_list = ListBox{parent=gls_abb_view_div,x=1,y=3,scroll_height=101,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||||
|
|
||||||
|
local _end = nil
|
||||||
|
|
||||||
for i = 1, #docs.glossary.abbvs do
|
for i = 1, #docs.glossary.abbvs do
|
||||||
local item = docs.glossary.abbvs[i] ---@type pocket_doc_item
|
local item = docs.glossary.abbvs[i] ---@type pocket_doc_item
|
||||||
|
|
||||||
doc_map[item.key] = TextBox{parent=abb_def_list,text=item.name,anchor=true,cpair(colors.blue,colors.black)}
|
doc_map[item.key] = TextBox{parent=abb_def_list,text=item.name,anchor=true,fg_bg=cpair(colors.blue,colors.black)}
|
||||||
TextBox{parent=abb_def_list,text=item.desc,fg_bg=label}
|
TextBox{parent=abb_def_list,text=item.desc,fg_bg=label}
|
||||||
TextBox{parent=abb_def_list,text="",fg_bg=label}
|
_end = Div{parent=abb_def_list,height=1,can_focus=true}
|
||||||
|
|
||||||
local function view()
|
local function view()
|
||||||
|
_end.focus()
|
||||||
gls_abb_view_page.nav_to()
|
gls_abb_view_page.nav_to()
|
||||||
doc_map[item.key].focus()
|
doc_map[item.key].focus()
|
||||||
end
|
end
|
||||||
|
|
||||||
PushButton{parent=abb_name_list,text=item.name,fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=view}
|
PushButton{parent=abb_name_list,text=item.name,fg_bg=cpair(colors.blue,colors.black),active_fg_bg=btn_active,callback=view}
|
||||||
end
|
end
|
||||||
|
|
||||||
local term_name_list = ListBox{parent=gls_term_div,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
local term_name_list = ListBox{parent=gls_term_div,x=1,y=3,scroll_height=20,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||||
local term_def_list = ListBox{parent=gls_term_view_div,x=2,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
local term_def_list = ListBox{parent=gls_term_view_div,x=1,y=3,scroll_height=100,nav_fg_bg=cpair(colors.lightGray,colors.gray),nav_active=cpair(colors.white,colors.gray)}
|
||||||
|
|
||||||
|
local _end_b = nil
|
||||||
|
|
||||||
for i = 1, #docs.glossary.terms do
|
for i = 1, #docs.glossary.terms do
|
||||||
local item = docs.glossary.terms[i] ---@type pocket_doc_item
|
local item = docs.glossary.terms[i] ---@type pocket_doc_item
|
||||||
|
|
||||||
doc_map[item.key] = TextBox{parent=term_def_list,text=item.name,anchor=true,cpair(colors.blue,colors.black)}
|
doc_map[item.key] = TextBox{parent=term_def_list,text=item.name,anchor=true,fg_bg=cpair(colors.blue,colors.black)}
|
||||||
TextBox{parent=term_def_list,text=item.desc,fg_bg=label}
|
TextBox{parent=term_def_list,text=item.desc,fg_bg=label}
|
||||||
TextBox{parent=term_def_list,text="",fg_bg=label}
|
_end_b = Div{parent=term_def_list,height=1,can_focus=true}
|
||||||
|
|
||||||
local function view()
|
local function view()
|
||||||
|
_end_b.focus()
|
||||||
gls_term_view_page.nav_to()
|
gls_term_view_page.nav_to()
|
||||||
doc_map[item.key].focus()
|
doc_map[item.key].focus()
|
||||||
end
|
end
|
||||||
|
|
||||||
PushButton{parent=term_name_list,text=item.name,fg_bg=btn_fg_bg,active_fg_bg=btn_active,callback=view}
|
PushButton{parent=term_name_list,text=item.name,fg_bg=cpair(colors.blue,colors.black),active_fg_bg=btn_active,callback=view}
|
||||||
end
|
end
|
||||||
|
|
||||||
-- setup multipane
|
-- setup multipane
|
||||||
|
@ -72,16 +72,16 @@ doc("G_RTU", "RTU", "Remote Terminal Unit. Provides monitoring to and basic outp
|
|||||||
doc("G_SCADA", "SCADA", "Supervisory Control and Data Acquisition. A control systems architecture used in many different process control applications.")
|
doc("G_SCADA", "SCADA", "Supervisory Control and Data Acquisition. A control systems architecture used in many different process control applications.")
|
||||||
doc("G_SVR", "SVR", "Supervisor. Abbreviation for the supervisory computer.")
|
doc("G_SVR", "SVR", "Supervisor. Abbreviation for the supervisory computer.")
|
||||||
|
|
||||||
target = docs.glossary.term
|
target = docs.glossary.terms
|
||||||
doc("G_Fault", "Fault", "Something has gone wrong and/or failed to function.")
|
doc("G_Fault", "Fault", "Something has gone wrong and/or failed to function.")
|
||||||
doc("G_FrontPanel", "Front Panel", "A basic interface on the front of a device for viewing and sometimes modifying its state. This is what you see when looking at a computer running one of the SCADA applications.")
|
doc("G_FrontPanel", "Front Panel", "A basic interface on the front of a device for viewing and sometimes modifying its state. This is what you see when looking at a computer running one of the SCADA applications.")
|
||||||
doc("G_Nominal", "Nominal", "Normal operation. Everything operating as intended.")
|
doc("G_Nominal", "Nominal", "Normal operation. Everything operating as intended.")
|
||||||
doc("G_Ringback", "Ringback", "An indication that an alarm had gone off so that you are aware, even if the alarm condition is no longer met.")
|
doc("G_Ringback", "Ringback", "An indication that an alarm had gone off so that you are aware, even if the alarm condition is no longer met.")
|
||||||
doc("G_SCRAM", "SCRAM", "Emergency shut-down of a reactor by stopping the fission reactor.")
|
doc("G_SCRAM", "SCRAM", "[Emergency] shut-down of a reactor by stopping the fission reactor. In Mekanism and here, it isn't always for an emergency.")
|
||||||
doc("G_Transient", "Transient", "A temporary change in state from normal operation. Coolant levels dropping or core temperature rising above nominal values would be examples of transients.")
|
doc("G_Transient", "Transient", "A temporary change in state from normal operation. Coolant levels dropping or core temperature rising above nominal values would be examples of transients.")
|
||||||
doc("G_Trip", "Trip", "A checked condition has occurred, also known as 'tripped'.")
|
doc("G_Trip", "Trip", "A checked condition has occurred, also known as 'tripped'.")
|
||||||
doc("G_Tripped", "Tripped", "An alarm condition has been met and is still met.")
|
doc("G_Tripped", "Tripped", "An alarm condition has been met and is still met.")
|
||||||
doc("G_Tripping", "Tripping", "An alarm condition is met but has not met the minimum time before a condition is deemed a problem.")
|
doc("G_Tripping", "Tripping", "An alarm condition is met but has not met the minimum time before a condition is deemed a problem.")
|
||||||
doc("G_TurbineTrip", "Turbine Trip", "The turbine stops, which prevents heated coolant from being properly cooled. In Mekanism, this would occur when a turbine cannot generate any more energy due to filling its buffer and having no output with any storage for energy left.")
|
doc("G_TurbineTrip", "Turbine Trip", "The turbine stopped, which prevents heated coolant from being properly cooled. In Mekanism, this would occur when a turbine cannot generate any more energy due to filling its buffer and having no output with any storage for energy left.")
|
||||||
|
|
||||||
return docs
|
return docs
|
||||||
|
Loading…
Reference in New Issue
Block a user