fix messagebox and rename some stuff

This commit is contained in:
Eduardo Bart
2012-02-08 00:11:57 -02:00
parent 619f751371
commit 1013ae279b
11 changed files with 39 additions and 26 deletions

View File

@@ -26,14 +26,15 @@ function UIMessageBox.display(title, message, flags)
if flags == MessageBoxOk then
buttonRight:setText('Ok')
connect(buttonRight, { onClick = function(self) self:getParent():ok() end })
connect(messagebox, { onEnter = function(self) self:ok() end })
connect(messagebox, { onEscape = function(self) self:ok() end })
elseif flags == MessageBoxCancel then
buttonRight:setText('Cancel')
connect(buttonRight, { onClick = function(self) self:getParent():cancel() end })
connect(messagebox, { onEnter = function(self) self:cancel() end })
connect(messagebox, { onEscape = function(self) self:cancel() end })
end
connect(messagebox, { onEnter = function(self) self:destroy() end })
connect(messagebox, { onEscape = function(self) self:destroy() end })
messagebox:lock()
return messagebox