Skip to content
Snippets Groups Projects
Commit 4457c1c9 authored by dg's avatar dg
Browse files

Escape works to cancel yes/no popups

git-svn-id: http://svn.net-core.org/repos/t-engine4@2552 51575b47-30f0-44d4-a5cc-537603b46e54
parent 2a4b87eb
No related branches found
No related tags found
No related merge requests found
......@@ -83,6 +83,7 @@ function _M:yesnoPopup(title, text, fct, yes_text, no_text)
-- d.key:addBind("EXIT", function() game:unregisterDialog(d) fct(false) end)
local ok = require("engine.ui.Button").new{text=yes_text or "Yes", fct=function() game:unregisterDialog(d) fct(true) end}
local cancel = require("engine.ui.Button").new{text=no_text or "No", fct=function() game:unregisterDialog(d) fct(false) end}
d.key:addBind("EXIT", function() game:unregisterDialog(d) game:unregisterDialog(d) fct(false) end)
d:loadUI{
{left = 3, top = 3, ui=require("engine.ui.Textzone").new{width=w+20, height=h+5, text=text}},
{left = 3, bottom = 3, ui=ok},
......@@ -103,6 +104,7 @@ function _M:yesnoLongPopup(title, text, w, fct, yes_text, no_text)
-- d.key:addBind("EXIT", function() game:unregisterDialog(d) fct(false) end)
local ok = require("engine.ui.Button").new{text=yes_text or "Yes", fct=function() game:unregisterDialog(d) fct(true) end}
local cancel = require("engine.ui.Button").new{text=no_text or "No", fct=function() game:unregisterDialog(d) fct(false) end}
d.key:addBind("EXIT", function() game:unregisterDialog(d) game:unregisterDialog(d) fct(false) end)
d:loadUI{
{left = 3, top = 3, ui=require("engine.ui.Textzone").new{width=w+20, height=self.font_h * #list, text=text}},
{left = 3, bottom = 3, ui=ok},
......
......@@ -80,7 +80,7 @@ newTalent{
newTalent{
name = "Gem Golem",
type = {"spell/advanced-golemancy",3},
require = spells_req3,
require = spells_req_high3,
mode = "passive",
points = 5,
info = function(self, t)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment