#410 pocket nav overhaul
This commit is contained in:
@@ -29,7 +29,11 @@ local function create_pages(root)
|
||||
------------------------
|
||||
|
||||
local alarm_test = Div{parent=root,x=1,y=1}
|
||||
local alarm_tasks = { db.diag.tone_test.get_tone_states }
|
||||
|
||||
local alarm_app = db.nav.register_app(iocontrol.APP_ID.ALARMS, alarm_test)
|
||||
|
||||
local page = alarm_app.new_page(nil, function () end)
|
||||
page.tasks = { db.diag.tone_test.get_tone_states }
|
||||
|
||||
local ttest = db.diag.tone_test
|
||||
|
||||
@@ -107,8 +111,6 @@ local function create_pages(root)
|
||||
local t_8 = IndicatorLight{parent=states,x=6,label="8",colors=c_blue_gray}
|
||||
|
||||
ttest.tone_indicators = { t_1, t_2, t_3, t_4, t_5, t_6, t_7, t_8 }
|
||||
|
||||
return { Alarm = { e = alarm_test, tasks = alarm_tasks } }
|
||||
end
|
||||
|
||||
return create_pages
|
||||
|
||||
24
pocket/ui/apps/dummy_app.lua
Normal file
24
pocket/ui/apps/dummy_app.lua
Normal file
@@ -0,0 +1,24 @@
|
||||
--
|
||||
-- Placeholder App
|
||||
--
|
||||
|
||||
local iocontrol = require("pocket.iocontrol")
|
||||
|
||||
local core = require("graphics.core")
|
||||
|
||||
local Div = require("graphics.elements.div")
|
||||
local TextBox = require("graphics.elements.textbox")
|
||||
|
||||
-- create placeholder app page
|
||||
---@param root graphics_element parent
|
||||
local function create_pages(root)
|
||||
local db = iocontrol.get_db()
|
||||
|
||||
local main = Div{parent=root,x=1,y=1}
|
||||
|
||||
db.nav.register_app(iocontrol.APP_ID.DUMMY, main).new_page(nil, function () end)
|
||||
|
||||
TextBox{parent=main,text="This app is not implemented yet.",x=1,y=2,alignment=core.ALIGN.CENTER}
|
||||
end
|
||||
|
||||
return create_pages
|
||||
Reference in New Issue
Block a user