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