diff --git a/include/ui/game_screen.hpp b/include/ui/game_screen.hpp index 12154c06..125dc31b 100644 --- a/include/ui/game_screen.hpp +++ b/include/ui/game_screen.hpp @@ -67,6 +67,7 @@ private: bool showPlayerInfo = false; bool showSocialFrame_ = false; // O key toggles social/friends list bool showGuildRoster_ = false; + bool showWorldMap_ = false; // W key toggles world map std::string selectedGuildMember_; bool showGuildNoteEdit_ = false; bool editingOfficerNote_ = false; diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index 20e8769d..5da57eda 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -1475,6 +1475,10 @@ void GameScreen::processTargetInput(game::GameHandler& gameHandler) { showNameplates_ = !showNameplates_; } + if (KeybindingManager::getInstance().isActionPressed(KeybindingManager::Action::TOGGLE_WORLD_MAP)) { + showWorldMap_ = !showWorldMap_; + } + // Action bar keys (1-9, 0, -, =) static const SDL_Scancode actionBarKeys[] = { SDL_SCANCODE_1, SDL_SCANCODE_2, SDL_SCANCODE_3, SDL_SCANCODE_4, @@ -4003,6 +4007,8 @@ void GameScreen::updateCharacterTextures(game::Inventory& inventory) { // ============================================================ void GameScreen::renderWorldMap(game::GameHandler& gameHandler) { + if (!showWorldMap_) return; + auto& app = core::Application::getInstance(); auto* renderer = app.getRenderer(); if (!renderer) return;