mirror of
https://github.com/edubart/otclient.git
synced 2025-10-20 06:23:26 +02:00
reorganize modules
This commit is contained in:
22
modules/core/ui.lua
Normal file
22
modules/core/ui.lua
Normal file
@@ -0,0 +1,22 @@
|
||||
UI = { }
|
||||
UI.root = getRootWidget()
|
||||
|
||||
function UI.loadAndDisplayLocked(otuiFile)
|
||||
local widget = loadUI(otuiFile, UI.root)
|
||||
UI.root:lockChild(widget)
|
||||
return widget
|
||||
end
|
||||
|
||||
function UI.loadAndDisplay(otuiFile)
|
||||
local widget = loadUI(otuiFile, UI.root)
|
||||
return widget
|
||||
end
|
||||
|
||||
function UI.display(widget)
|
||||
UI.root:addChild(widget)
|
||||
end
|
||||
|
||||
function UI.displayLocked(widget)
|
||||
UI.root:addChild(widget)
|
||||
UI.root:lockChild(widget)
|
||||
end
|
Reference in New Issue
Block a user