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

DebugConsole does not ruin the game mouse handling

git-svn-id: http://svn.net-core.org/repos/t-engine4@1257 51575b47-30f0-44d4-a5cc-537603b46e54
parent 45a76a4d
No related branches found
No related tags found
No related merge requests found
......@@ -85,10 +85,13 @@ function _M:init()
end,
}
-- Scroll message log
game.mouse:registerZone(self.display_x, self.display_y, self.w, self.h, function(button)
if button == "wheelup" then self:scrollUp(1) end
if button == "wheeldown" then self:scrollUp(-1) end
end, {button=true})
self:mouseZones{
{ x=0, y=0, w=game.w, h=game.h, mode={button=true}, norestrict=true, fct=function(button) if button ~= "none" then game:unregisterDialog(self) end end},
{ x=0, y=0, w=self.iw, h=self.ih, mode={button=true}, fct=function(button, x, y, xrel, yrel, tx, ty)
if button == "wheelup" then self:scrollUp(1) end
if button == "wheeldown" then self:scrollUp(-1) end
end },
}
end
function _M:drawDialog(s, w, h)
......
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