From 4ba07433712952ff06219a0166634e2636a12d7d Mon Sep 17 00:00:00 2001 From: mojsior Date: Mon, 9 Feb 2026 16:10:45 +0100 Subject: [PATCH] access: fix Tab stash focus switching --- Source/diablo.cpp | 14 ++++++++++---- Translations/pl.po | 4 ++-- 2 files changed, 12 insertions(+), 6 deletions(-) diff --git a/Source/diablo.cpp b/Source/diablo.cpp index 114f86783..527cb96a9 100644 --- a/Source/diablo.cpp +++ b/Source/diablo.cpp @@ -1902,16 +1902,22 @@ void InitKeymapActions() options.Keymapper.AddAction( "ToggleAutomap", N_("Toggle automap"), - N_("Toggles if automap is displayed."), + N_("Toggles if automap is displayed. While the stash is open, switches between inventory and stash."), SDLK_TAB, - DoAutoMap, + [] { + if (IsStashOpen) { + ToggleStashFocus(); + return; + } + DoAutoMap(); + }, nullptr, - []() { return IsGameRunning() && !IsStashOpen; }); + IsGameRunning); options.Keymapper.AddAction( "ToggleStashFocus", N_("Toggle stash focus"), N_("Tab: switches between inventory and stash."), - SDLK_TAB, + SDLK_UNKNOWN, ToggleStashFocus, nullptr, []() { return IsStashOpen && !InGameMenu() && !ChatLogFlag; }); diff --git a/Translations/pl.po b/Translations/pl.po index 16e50e8e8..a874b0031 100644 --- a/Translations/pl.po +++ b/Translations/pl.po @@ -1540,8 +1540,8 @@ msgid "Toggle automap" msgstr "Przełączanie automapy" #: Source/diablo.cpp:1896 Source/diablo.cpp:2305 -msgid "Toggles if automap is displayed." -msgstr "Przełącza, czy wyświetlana jest automapa." +msgid "Toggles if automap is displayed. While the stash is open, switches between inventory and stash." +msgstr "Przełącza wyświetlanie automapy. Gdy skrytka jest otwarta, przełącza między ekwipunkiem a skrytką." #: Source/diablo.cpp:1903 msgid "Toggle stash focus"