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

allow the UseItemDialog to handle mouse correctly

git-svn-id: http://svn.net-core.org/repos/t-engine4@840 51575b47-30f0-44d4-a5cc-537603b46e54
parent 39cf0c07
No related branches found
No related tags found
No related merge requests found
......@@ -48,13 +48,11 @@ function _M:init(actor, object, item, inven, onuse)
EXIT = function() game:unregisterDialog(self) end,
})
self:mouseZones{
{ x=2, y=45, w=350, h=self.font_h*self.max, fct=function(button, x, y, xrel, yrel, tx, ty)
{ x=0, y=0, w=350, h=self.ih, fct=function(button, x, y, xrel, yrel, tx, ty)
self.changed = true
self.sel = util.bound(self.scroll + math.floor(ty / self.font_h), 1, #self.list)
if button == "left" then self:learn(true)
elseif button == "right" then self:learn(false)
if button == "left" then self:use()
end
self.changed = true
end },
}
end
......
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