diff --git a/game/modules/tome/dialogs/MapMenu.lua b/game/modules/tome/dialogs/MapMenu.lua index 89355c6d927357d69307f076cfda8e10eca6a743..58a89ceafba7be44882b8bb3c95471c782127588 100644 --- a/game/modules/tome/dialogs/MapMenu.lua +++ b/game/modules/tome/dialogs/MapMenu.lua @@ -46,6 +46,9 @@ function _M:init(mx, my, tmx, tmy) self.force_y = my - (self.h - self.ih + list.fh / 3) end) + self.mouse:reset() + self.mouse:registerZone(0, 0, game.w, game.h, function(button, x, y, xrel, yrel, bx, by, event) if (button == "left" or button == "right") and event == "button" then self.key:triggerVirtual("EXIT") end end) + self.mouse:registerZone(self.display_x, self.display_y, self.w, self.h, function(button, x, y, xrel, yrel, bx, by, event) if button == "right" and event == "button" then self.key:triggerVirtual("EXIT") else self:mouseEvent(button, x, y, xrel, yrel, bx, by, event) end end) self.key:addBinds{ EXIT = function() game:unregisterDialog(self) end, } end