2011-04-23 22:04:49 +02:00
|
|
|
function messageBox(title, text)
|
2011-05-01 20:47:35 +02:00
|
|
|
local messageBoxWindow = UI.load("modules/messagebox/messagebox.yml")
|
2011-05-02 06:13:57 +02:00
|
|
|
local messageBoxLabel = messageBoxWindow:getChildById("messageBoxLabel")
|
|
|
|
local messageBoxOkButton = messageBoxWindow:getChildById("messageBoxOkButton")
|
|
|
|
messageBoxWindow.locked = true
|
|
|
|
messageBoxWindow.title = title
|
|
|
|
messageBoxLabel.text = text
|
2011-05-01 20:47:35 +02:00
|
|
|
--messageBoxWindow:setSize(messageBoxLabel:getSize() + Size{20, 20})
|
2011-05-02 06:13:57 +02:00
|
|
|
messageBoxWindow.onDestroy = function() self.locked = false end
|
|
|
|
messageBoxOkButton.onClick = function() messageBoxWindow:destroy() end
|
2011-05-01 20:47:35 +02:00
|
|
|
end
|