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

Tab will cycle between minimap, full map, no minimap

git-svn-id: http://svn.net-core.org/repos/t-engine4@5632 51575b47-30f0-44d4-a5cc-537603b46e54
parent bfa247d9
No related branches found
No related tags found
No related merge requests found
......@@ -1572,7 +1572,18 @@ do return end
end,
SHOW_MAP = function()
game:registerDialog(require("mod.dialogs.ShowMap").new())
if config.settings.tome.uiset_mode == "Minimalist" then
self.uiset.mm_mode = util.boundWrap((self.uiset.mm_mode or 2) + 1, 1, 3)
if self.uiset.mm_mode == 1 then
self.uiset.no_minimap = true
elseif self.uiset.mm_mode == 2 then
self.uiset.no_minimap = false
elseif self.uiset.mm_mode == 3 then
game:registerDialog(require("mod.dialogs.ShowMap").new(function() self.uiset.mm_mode = 1 self.uiset.no_minimap = true end))
end
else
game:registerDialog(require("mod.dialogs.ShowMap").new())
end
end,
USERCHAT_SHOW_TALK = function()
......
......@@ -23,7 +23,8 @@ local GenericContainer = require "engine.ui.GenericContainer"
module(..., package.seeall, class.inherit(Dialog))
function _M:init()
function _M:init(mm_mode)
self.mm_mode = mm_mode
self.title_shadow = false
self.color = {r=0x3a, g=0x35, b=0x33}
......@@ -94,6 +95,8 @@ end
function _M:unload()
game.uiset.no_minimap = nil
game.uiset:setupMinimap(game.level)
if self.mm_mode then self.mm_mode() end
end
function _M:innerDisplay(x, y, nb_keyframes)
......
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