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

Right click on the map dialog will scroll

git-svn-id: http://svn.net-core.org/repos/t-engine4@5567 51575b47-30f0-44d4-a5cc-537603b46e54
parent 824b6b9b
No related branches found
No related tags found
No related merge requests found
......@@ -40,7 +40,7 @@ newChat{ id="die",
I...had plans for you, but I can not go against your free will. Know that you had a destiny waiting for you.
Are you sure?]],
answers = {
{"Just let me go please.", action=function(npc, player) game:getPlayer(true):die(game.player, {special_death_msg=("asked the Eidolon to let %s die in peace"):format(game.player.female and "her" or "his")}) end},
{"Just let me go please.", action=function(npc, player) game:getPlayer(true):die(game.player, {special_death_msg=("asked the Eidolon to let %s die in peace"):format(game.player.female and "her" or "him")}) end},
{"No actually, perhaps life is still worth it!"},
}
}
......
......@@ -62,7 +62,7 @@ function _M:init()
local ts = game.tooltip:getTooltipAtMap(dx, dy, dx, dy)
if ts then game.tooltip:set(ts) game.tooltip:display() else game.tooltip:erase() end
if xrel and yrel and button == "left" and core.key.modState("ctrl") then
if button == "right" then
game.minimap_scroll_x = dx - math.floor(t_per_w / 2)
game.minimap_scroll_y = dy - math.floor(t_per_h / 2)
......@@ -70,7 +70,7 @@ function _M:init()
game.minimap_scroll_y = util.bound(game.minimap_scroll_y, 0, math.max(0, map.h - t_per_h))
elseif button == "left" and not xrel and not yrel and event == "button" then
game.player:mouseMove(dx, dy)
elseif button == "right" then
elseif xrel or yrel then
game.level.map:moveViewSurround(dx, dy, 1000, 1000)
elseif event == "button" and button == "middle" then
self.key:triggerVirtual("SHOW_MAP")
......
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