| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293 |
- --[[
- @module tsb_help_page
- @summary 帮助页面
- @version 1.0
- @date 2026.03.17
- @author 李一玮
- @usage
- 本文件是帮助页面,展示帮助的各种用法。
- ]]
- local tsb_help_page = {}
- -- 页面UI元素
- local main_container = nil
- local common_ui = require("tsb_common_page")
- -- 创建UI
- function tsb_help_page .create_ui()
- main_container = airui.container({
- x = 0,
- y = 0,
- w = 480,
- h = 320,
- color = 0xF5F5F5,
- })
- --------------------- 标题栏 ------------------------
- local title_bar = airui.container({
- parent = main_container,
- x = 0,
- y = 0,
- w = 480,
- h = 30,
- color = 0xCE93D8,
- })
- airui.label({
- parent = title_bar,
- text = "帮助界面",
- x = 190,
- y = 8,
- w = 200,
- h = 20,
- font_size = 16,
- color = 0xFFFFFF,
- })
- -- 标题栏公共信息展示
- common_ui.add_battery_display(title_bar)
- common_ui.create_back_button(title_bar, tsb_help_page .cleanup)
- -- 滚动容器
- local scroll_container = airui.container({
- parent = main_container,
- x = 0,
- y = 30,
- w = 480,
- h = 290,
- color = 0xFFFFFF,
- })
- local hardware_img = airui.image({
- parent = scroll_container,
- x = 0,
- y = 0,
- w = 480,
- h = 290,
- src = "/luadb/hardware.png",
- zoom = 145,
- opacity = 255,
- })
- ---------------------------------------------------
- -- 底部信息
- --common_ui.create_status_bar(main_container)
- end
- -- 初始化页面
- function tsb_help_page .init(params)
- tsb_help_page .create_ui()
- end
- -- 清理页面
- function tsb_help_page .cleanup()
- common_ui.cleanup()
- if main_container then
- main_container:destroy()
- main_container = nil
- end
- end
- return tsb_help_page
|