mirror of
https://github.com/edubart/otclient.git
synced 2025-10-14 19:44:54 +02:00
fix messagebox and rename some stuff
This commit is contained in:
@@ -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
|
||||
|
Reference in New Issue
Block a user