mirror of
https://github.com/edubart/otclient.git
synced 2025-10-24 00:05:02 +02:00
scripting rework
This commit is contained in:
@@ -1,9 +1,11 @@
|
||||
function messageBox(title, text)
|
||||
local msgbox = UI.load("modules/messagebox/messagebox.yml")
|
||||
local label = msgbox:getChildById("messageBoxLabel")
|
||||
local okButton = msgbox:getChildById("messageBoxOkButton")
|
||||
msgbox.locked = true
|
||||
msgbox.title = title
|
||||
label.text = text
|
||||
okButton.onClick = function() msgbox:destroy() end
|
||||
function autoDestroyParent()
|
||||
self.parent:destroy()
|
||||
end
|
||||
|
||||
function messageBox(title, text)
|
||||
local msgBox = UI.load("modules/messagebox/messagebox.yml")
|
||||
msgBox.locked = true
|
||||
msgBox.title = title
|
||||
msgBox:child("textLabel").text = text
|
||||
msgBox:child("okButton").onClick = autoDestroyParent
|
||||
end
|
||||
|
Reference in New Issue
Block a user