scripting rework

This commit is contained in:
Eduardo Bart
2011-05-02 19:48:41 -03:00
parent f290b4f89c
commit c052723477
24 changed files with 622 additions and 375 deletions

View File

@@ -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