enable enter/escape actions for windows

This commit is contained in:
Eduardo Bart
2011-08-28 23:03:31 -03:00
parent d3cd4feee5
commit f54fd34cb3
8 changed files with 33 additions and 13 deletions

View File

@@ -33,6 +33,8 @@ function MessageBox.create(title, text, flags)
box.onOk()
box:destroy()
end
window.onEnter = buttonRight.onClick
window.onEscape = buttonRight.onClick
elseif flags == MessageBoxCancel then
buttonRight:setText("Cancel")
box.onCancel = EmptyFunction
@@ -40,6 +42,8 @@ function MessageBox.create(title, text, flags)
box.onCancel()
box:destroy()
end
window.onEnter = buttonRight.onClick
window.onEscape = buttonRight.onClick
end
box.window = window