diff --git a/client/adventureMap/AdventureMapShortcuts.cpp b/client/adventureMap/AdventureMapShortcuts.cpp index 2db16f04b..222553e78 100644 --- a/client/adventureMap/AdventureMapShortcuts.cpp +++ b/client/adventureMap/AdventureMapShortcuts.cpp @@ -71,6 +71,8 @@ std::vector AdventureMapShortcuts::getShortcuts() { EShortcut::ADVENTURE_QUEST_LOG, optionCanViewQuests(), [this]() { this->showQuestlog(); } }, { EShortcut::ADVENTURE_TOGGLE_SLEEP, optionHeroSelected(), [this]() { this->toggleSleepWake(); } }, { EShortcut::ADVENTURE_TOGGLE_GRID, optionInMapView(), [this]() { this->toggleGrid(); } }, + { EShortcut::ADVENTURE_TOGGLE_VISITABLE, optionInMapView(), [this]() { this->toggleVisitable(); } }, + { EShortcut::ADVENTURE_TOGGLE_BLOCKED, optionInMapView(), [this]() { this->toggleBlocked(); } }, { EShortcut::ADVENTURE_TRACK_HERO, optionInMapView(), [this]() { this->toggleTrackHero(); } }, { EShortcut::ADVENTURE_SET_HERO_ASLEEP, optionHeroAwake(), [this]() { this->setHeroSleeping(); } }, { EShortcut::ADVENTURE_SET_HERO_AWAKE, optionHeroSleeping(), [this]() { this->setHeroAwake(); } }, @@ -168,6 +170,18 @@ void AdventureMapShortcuts::toggleGrid() s["showGrid"].Bool() = !settings["gameTweaks"]["showGrid"].Bool(); } +void AdventureMapShortcuts::toggleVisitable() +{ + Settings s = settings.write["session"]; + s["showVisitable"].Bool() = !settings["session"]["showVisitable"].Bool(); +} + +void AdventureMapShortcuts::toggleBlocked() +{ + Settings s = settings.write["session"]; + s["showBlocked"].Bool() = !settings["session"]["showBlocked"].Bool(); +} + void AdventureMapShortcuts::toggleSleepWake() { if (!optionHeroSelected()) diff --git a/client/adventureMap/AdventureMapShortcuts.h b/client/adventureMap/AdventureMapShortcuts.h index 7b1e1ec7d..b32f3ea29 100644 --- a/client/adventureMap/AdventureMapShortcuts.h +++ b/client/adventureMap/AdventureMapShortcuts.h @@ -42,6 +42,8 @@ class AdventureMapShortcuts void showQuestlog(); void toggleTrackHero(); void toggleGrid(); + void toggleVisitable(); + void toggleBlocked(); void toggleSleepWake(); void setHeroSleeping(); void setHeroAwake(); diff --git a/client/gui/Shortcut.h b/client/gui/Shortcut.h index aedf695d9..64891abe3 100644 --- a/client/gui/Shortcut.h +++ b/client/gui/Shortcut.h @@ -120,6 +120,8 @@ enum class EShortcut // Adventure map screen ADVENTURE_GAME_OPTIONS, // 'o', Open CAdventureOptions window ADVENTURE_TOGGLE_GRID, // F6, Toggles map grid + ADVENTURE_TOGGLE_VISITABLE, // Toggles visitable tiles overlay + ADVENTURE_TOGGLE_BLOCKED, // Toggles blocked tiles overlay ADVENTURE_TOGGLE_SLEEP, // Toggles hero sleep status ADVENTURE_SET_HERO_ASLEEP, // Moves hero to sleep state ADVENTURE_SET_HERO_AWAKE, // Move hero to awake state diff --git a/client/gui/ShortcutHandler.cpp b/client/gui/ShortcutHandler.cpp index 259a1c6cb..e07bcb8bb 100644 --- a/client/gui/ShortcutHandler.cpp +++ b/client/gui/ShortcutHandler.cpp @@ -171,6 +171,8 @@ EShortcut ShortcutHandler::findShortcut(const std::string & identifier ) const {"gameActivateConsole", EShortcut::GAME_ACTIVATE_CONSOLE }, {"adventureGameOptions", EShortcut::ADVENTURE_GAME_OPTIONS }, {"adventureToggleGrid", EShortcut::ADVENTURE_TOGGLE_GRID }, + {"adventureToggleVisitable", EShortcut::ADVENTURE_TOGGLE_VISITABLE}, + {"adventureToggleBlocked", EShortcut::ADVENTURE_TOGGLE_BLOCKED }, {"adventureToggleSleep", EShortcut::ADVENTURE_TOGGLE_SLEEP }, {"adventureSetHeroAsleep", EShortcut::ADVENTURE_SET_HERO_ASLEEP }, {"adventureSetHeroAwake", EShortcut::ADVENTURE_SET_HERO_AWAKE }, diff --git a/config/shortcutsConfig.json b/config/shortcutsConfig.json index 817d89b96..fd57c1a80 100644 --- a/config/shortcutsConfig.json +++ b/config/shortcutsConfig.json @@ -40,6 +40,8 @@ "adventureSetHeroAwake": "W", "adventureThievesGuild": "G", "adventureToggleGrid": "F6", + "adventureToggleVisitable": [], + "adventureToggleBlocked": [], "adventureToggleMapLevel": "U", "adventureToggleSleep": [], "adventureTrackHero": "F5",