2023-07-29 22:16:59 +00:00
|
|
|
local core = require("graphics.core")
|
2023-04-16 19:05:28 +00:00
|
|
|
|
2023-07-29 22:16:59 +00:00
|
|
|
local Div = require("graphics.elements.div")
|
2023-04-16 19:05:28 +00:00
|
|
|
|
2023-07-29 22:16:59 +00:00
|
|
|
local App = require("graphics.elements.controls.app")
|
2023-04-16 19:05:28 +00:00
|
|
|
|
2023-07-29 22:16:59 +00:00
|
|
|
local cpair = core.cpair
|
2023-04-16 19:05:28 +00:00
|
|
|
|
|
|
|
-- new home page view
|
|
|
|
---@param root graphics_element parent
|
|
|
|
local function new_view(root)
|
|
|
|
local main = Div{parent=root,x=1,y=1}
|
|
|
|
|
2023-07-29 22:16:59 +00:00
|
|
|
App{parent=main,x=3,y=2,text="\x17",title="PRC",callback=function()end,app_fg_bg=cpair(colors.black,colors.purple)}
|
|
|
|
App{parent=main,x=10,y=2,text="\x15",title="CTL",callback=function()end,app_fg_bg=cpair(colors.black,colors.green)}
|
|
|
|
App{parent=main,x=17,y=2,text="\x08",title="DEV",callback=function()end,app_fg_bg=cpair(colors.black,colors.lightGray)}
|
|
|
|
App{parent=main,x=3,y=7,text="\x7f",title="Waste",callback=function()end,app_fg_bg=cpair(colors.black,colors.brown)}
|
|
|
|
App{parent=main,x=10,y=7,text="\xb6",title="Guide",callback=function()end,app_fg_bg=cpair(colors.black,colors.cyan)}
|
2023-04-16 19:05:28 +00:00
|
|
|
|
|
|
|
return main
|
|
|
|
end
|
|
|
|
|
|
|
|
return new_view
|