mirror of
https://github.com/vcmi/vcmi.git
synced 2025-11-29 23:07:48 +02:00
Add unassigned by default hotkeys to show visitable or blocked tiles
This commit is contained in:
@@ -71,6 +71,8 @@ std::vector<AdventureMapShortcutState> 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())
|
||||
|
||||
Reference in New Issue
Block a user