error proning

This commit is contained in:
Eduardo Bart
2011-04-23 20:23:52 -03:00
parent 3960240b8e
commit c1b2b3ed3a
8 changed files with 39 additions and 27 deletions

View File

@@ -3,10 +3,10 @@ function messageBox(title, text)
local messageBoxLabel = messageBoxWindow:getChildByID("messageBoxLabel")
local messageBoxOkButton = messageBoxWindow:getChildByID("messageBoxOkButton")
local uiRoot = messageBoxWindow:getParent()
uiRoot:lock(messageBox)
messageBoxWindow:setTitle(text)
messageBoxLabel:setText(text)
messageBoxWindow:setSize(messageBoxLabel:getSize() + Size{20, 20})
messageBox:setOnDestroy(function() uiRoot:unlock() end)
uiRoot:lock(messageBoxWindow)
--messageBoxWindow:setTitle(text)
--messageBoxLabel:setText(text)
--messageBoxWindow:setSize(messageBoxLabel:getSize() + Size{20, 20})
messageBoxWindow:setOnDestroy(function() uiRoot:unlock() end)
messageBoxOkButton:setOnClick(function() messageBoxWindow:destroy() end)
end
end

View File

@@ -15,4 +15,4 @@ window#messageBoxWindow:
anchors.right: parent.right
anchors.bottom: parent.bottom
margin.bottom: 10
margin.right: 10
margin.right: 10