summaryrefslogtreecommitdiff
path: root/xmake/core/ui/program.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2018-01-10 00:46:38 +0800
committerruki <[email protected]>2018-01-09 22:39:52 +0800
commit273ea08ed48c9c4a7d5355256a45285188297d82 (patch)
treeb01a43a43590027d40212088819b1b420316cd8d /xmake/core/ui/program.lua
parent2fc03e778ad00bef537b5adb6cd40b70a64a2a96 (diff)
fix border color and height
Diffstat (limited to 'xmake/core/ui/program.lua')
-rw-r--r--xmake/core/ui/program.lua11
1 files changed, 11 insertions, 0 deletions
diff --git a/xmake/core/ui/program.lua b/xmake/core/ui/program.lua
index 765d95732..2075a466d 100644
--- a/xmake/core/ui/program.lua
+++ b/xmake/core/ui/program.lua
@@ -141,6 +141,17 @@ function program:event()
end
end
+-- on event
+function program:event_on(e)
+ if panel.event_on(self, e) then
+ return true
+ end
+ if e.type == event.ev_keyboard and (e.key_name == "Esc" or e.key_name == "CtrlC") then
+ self:quit()
+ return true
+ end
+end
+
-- put an event to view
function program:event_put(e)