summaryrefslogtreecommitdiff
path: root/library/lua
diff options
context:
space:
mode:
authorAlexander Gavrilov2012-08-24 13:20:08 +0400
committerAlexander Gavrilov2012-08-24 13:20:08 +0400
commite825dc5ddb1f2c0798b571ebcb02a52e184fc689 (patch)
treef5fe92c3ea5b2f56e677f8d9d0b670e252317b4c /library/lua
parentb12b9fa91e3be0d4d157f144f4b20202cdb72917 (diff)
downloaddfhack-e825dc5ddb1f2c0798b571ebcb02a52e184fc689.tar.gz
dfhack-e825dc5ddb1f2c0798b571ebcb02a52e184fc689.tar.bz2
dfhack-e825dc5ddb1f2c0798b571ebcb02a52e184fc689.tar.xz
Tweak the API for current viewscreen, and dispatch show/dismiss from C++.
Diffstat (limited to 'library/lua')
-rw-r--r--library/lua/gui.lua11
1 files changed, 4 insertions, 7 deletions
diff --git a/library/lua/gui.lua b/library/lua/gui.lua
index f9a45548..62e393f0 100644
--- a/library/lua/gui.lua
+++ b/library/lua/gui.lua
@@ -232,9 +232,7 @@ function Screen:show(below)
error("This screen is already on display")
end
self:onAboutToShow(below)
- if dscreen.show(self, below) then
- self:onShown()
- else
+ if not dscreen.show(self, below) then
error('Could not show screen')
end
end
@@ -242,17 +240,16 @@ end
function Screen:onAboutToShow()
end
-function Screen:onShown()
+function Screen:onShow()
end
function Screen:dismiss()
- if self._native and not dscreen.isDismissed(self) then
+ if self._native then
dscreen.dismiss(self)
- self:onDismissed()
end
end
-function Screen:onDismissed()
+function Screen:onDismiss()
end
------------------------