cc-mek-scada/pocket/ui/apps/dummy_app.lua

27 lines
769 B
Lua
Raw Normal View History

2023-12-22 16:12:47 +00:00
--
2024-04-13 18:47:20 +00:00
-- Placeholder App
2023-12-22 16:12:47 +00:00
--
2023-04-16 19:05:28 +00:00
2023-12-22 16:12:47 +00:00
local iocontrol = require("pocket.iocontrol")
2023-04-16 19:05:28 +00:00
2023-12-22 16:12:47 +00:00
local core = require("graphics.core")
2023-04-16 19:05:28 +00:00
2023-12-22 16:12:47 +00:00
local Div = require("graphics.elements.div")
local TextBox = require("graphics.elements.textbox")
2023-04-16 19:05:28 +00:00
2024-04-13 18:47:20 +00:00
-- create placeholder app page
2023-04-16 19:05:28 +00:00
---@param root graphics_element parent
2024-04-13 18:47:20 +00:00
local function create_pages(root)
2023-12-22 16:12:47 +00:00
local db = iocontrol.get_db()
2023-04-16 19:05:28 +00:00
local main = Div{parent=root,x=1,y=1}
2024-04-13 18:47:20 +00:00
db.nav.register_app(iocontrol.APP_ID.DUMMY, main).new_page(nil, function () end)
2023-04-16 19:05:28 +00:00
2024-04-13 18:47:20 +00:00
TextBox{parent=main,text="This app is not implemented yet.",x=1,y=2,alignment=core.ALIGN.CENTER}
TextBox{parent=main,text=" pretend something cool is here \x03",x=1,y=10,alignment=core.ALIGN.CENTER,fg_bg=core.cpair(colors.gray,colors.black)}
2023-04-16 19:05:28 +00:00
end
2024-04-13 18:47:20 +00:00
return create_pages