|
|
|
@ -59,11 +59,11 @@ function MessageBox:onDestroy()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function MessageBox:onInput(keys)
|
|
|
|
|
if keys.SELECT or keys.LEAVESCREEN then
|
|
|
|
|
if keys.SELECT or keys.LEAVESCREEN or keys._MOUSE_R_DOWN then
|
|
|
|
|
self:dismiss()
|
|
|
|
|
if keys.SELECT and self.on_accept then
|
|
|
|
|
self.on_accept()
|
|
|
|
|
elseif keys.LEAVESCREEN and self.on_cancel then
|
|
|
|
|
elseif (keys.LEAVESCREEN or keys._MOUSE_R_DOWN) and self.on_cancel then
|
|
|
|
|
self.on_cancel()
|
|
|
|
|
end
|
|
|
|
|
return true
|
|
|
|
@ -130,7 +130,7 @@ function InputBox:onInput(keys)
|
|
|
|
|
self.on_input(self.subviews.edit.text)
|
|
|
|
|
end
|
|
|
|
|
return true
|
|
|
|
|
elseif keys.LEAVESCREEN then
|
|
|
|
|
elseif keys.LEAVESCREEN or keys._MOUSE_R_DOWN then
|
|
|
|
|
self:dismiss()
|
|
|
|
|
if self.on_cancel then
|
|
|
|
|
self.on_cancel()
|
|
|
|
@ -231,7 +231,7 @@ function ListBox:getWantedFrameSize()
|
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
function ListBox:onInput(keys)
|
|
|
|
|
if keys.LEAVESCREEN then
|
|
|
|
|
if keys.LEAVESCREEN or keys._MOUSE_R_DOWN then
|
|
|
|
|
self:dismiss()
|
|
|
|
|
if self.on_cancel then
|
|
|
|
|
self.on_cancel()
|
|
|
|
|