ui.lua

main 25 lines · 529 bytes Raw
Alex Alex Commit Client Upload Part 2 19/10/2026 00:06
1local context = G.botContext
2if type(context.UI) ~= "table" then
3 context.UI = {}
4end
5local UI = context.UI
6
7UI.createWidget = function(name, parent)
8 if parent == nil then
9 parent = context.panel
10 end
11 local widget = g_ui.createWidget(name, parent)
12 widget.botWidget = true
13 return widget
14end
15
16UI.createWindow = function(name)
17 local widget = g_ui.createWidget(name, g_ui.getRootWidget())
18 widget.botWidget = true
19 widget:show()
20 widget:raise()
21 widget:focus()
22 return widget
23end
24
25
Top