Skip to content
Snippets Groups Projects
Commit 270ce958 authored by dg's avatar dg
Browse files

mouse works in inventory & stores dialogs

git-svn-id: http://svn.net-core.org/repos/t-engine4@580 51575b47-30f0-44d4-a5cc-537603b46e54
parent fbfc5c0c
No related branches found
No related tags found
No related merge requests found
......@@ -88,8 +88,15 @@ function _M:init(title, actor, filter, action)
EXIT = function() game:unregisterDialog(self) end,
})
self:mouseZones{
{ x=2, y=5, w=350, h=self.font_h*self.max, fct=function(button, x, y, xrel, yrel, tx, ty)
{ x=2, y=5, w=self.iw, h=self.font_h*self.max, fct=function(button, x, y, xrel, yrel, tx, ty)
if tx < self.iw / 2 then
self.list = self.equip_list
else
self.list = self.inven_list
end
self.sel = util.bound(self.scroll + math.floor(ty / self.font_h), 1, #self.list)
self.changed = true
if button == "left" then self:use()
elseif button == "right" then
end
......
......@@ -54,8 +54,14 @@ function _M:init(title, store_inven, actor_inven, store_filter, actor_filter, ac
EXIT = function() game:unregisterDialog(self) end,
})
self:mouseZones{
{ x=2, y=5, w=350, h=self.font_h*self.max, fct=function(button, x, y, xrel, yrel, tx, ty)
{ x=2, y=5, w=self.iw, h=self.font_h*self.max, fct=function(button, x, y, xrel, yrel, tx, ty)
if tx < self.iw / 2 then
self.list = self.store_list
else
self.list = self.actor_list
end
self.sel = util.bound(self.scroll + math.floor(ty / self.font_h), 1, #self.list)
self.changed = true
if button == "left" then self:use()
elseif button == "right" then
end
......
......@@ -35,7 +35,7 @@ newEntity{
game.logPlayer(who, "You have %d stat point(s) to spend. Press G to use them.", who.unused_stats)
game.logPlayer(who, "You have %d talent point(s) to spend. Press G to use them.", who.unused_talents)
who:learnTalentType("gift/sand", false)
who:learnTalentType("wild-gift/sand-drake", false)
game.logPlayer(who, "You are transformed by the heart of the Queen!.")
game.logPlayer(who, "#00FF00#You gain an affinity for sand. You can now learn new sand talents (press G).")
......
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