From 2f1c9eb01beb51ae06b136c10ad6138e9abca4d9 Mon Sep 17 00:00:00 2001 From: Kelsi Date: Wed, 11 Mar 2026 22:13:22 -0700 Subject: [PATCH] Add FOV slider to settings, expand combat chat tab with skills/achievements/NPC speech --- include/ui/game_screen.hpp | 1 + src/ui/game_screen.cpp | 28 ++++++++++++++++++++++++++-- 2 files changed, 27 insertions(+), 2 deletions(-) diff --git a/include/ui/game_screen.hpp b/include/ui/game_screen.hpp index 229ab28d..35f83743 100644 --- a/include/ui/game_screen.hpp +++ b/include/ui/game_screen.hpp @@ -109,6 +109,7 @@ private: float pendingMouseSensitivity = 0.2f; bool pendingInvertMouse = false; bool pendingExtendedZoom = false; + float pendingFov = 70.0f; // degrees, default matches WoW's ~70° horizontal FOV int pendingUiOpacity = 65; bool pendingMinimapRotate = false; bool pendingMinimapSquare = false; diff --git a/src/ui/game_screen.cpp b/src/ui/game_screen.cpp index e06f451b..cf7d9f46 100644 --- a/src/ui/game_screen.cpp +++ b/src/ui/game_screen.cpp @@ -144,9 +144,15 @@ void GameScreen::initChatTabs() { chatTabs_.clear(); // General tab: shows everything chatTabs_.push_back({"General", 0xFFFFFFFF}); - // Combat tab: system + loot messages + // Combat tab: system, loot, skills, achievements, and NPC speech/emotes chatTabs_.push_back({"Combat", (1u << static_cast(game::ChatType::SYSTEM)) | - (1u << static_cast(game::ChatType::LOOT))}); + (1u << static_cast(game::ChatType::LOOT)) | + (1u << static_cast(game::ChatType::SKILL)) | + (1u << static_cast(game::ChatType::ACHIEVEMENT)) | + (1u << static_cast(game::ChatType::GUILD_ACHIEVEMENT)) | + (1u << static_cast(game::ChatType::MONSTER_SAY)) | + (1u << static_cast(game::ChatType::MONSTER_YELL)) | + (1u << static_cast(game::ChatType::MONSTER_EMOTE))}); // Whispers tab chatTabs_.push_back({"Whispers", (1u << static_cast(game::ChatType::WHISPER)) | (1u << static_cast(game::ChatType::WHISPER_INFORM))}); @@ -9615,6 +9621,17 @@ void GameScreen::renderSettingsWindow() { if (ImGui::IsItemHovered()) ImGui::SetTooltip("Allow the camera to zoom out further than normal"); + if (ImGui::SliderFloat("Field of View", &pendingFov, 45.0f, 110.0f, "%.0f°")) { + if (renderer) { + if (auto* camera = renderer->getCamera()) { + camera->setFov(pendingFov); + } + } + saveSettings(); + } + if (ImGui::IsItemHovered()) + ImGui::SetTooltip("Camera field of view in degrees (default: 70)"); + ImGui::Spacing(); ImGui::Spacing(); @@ -10866,6 +10883,7 @@ void GameScreen::saveSettings() { out << "mouse_sensitivity=" << pendingMouseSensitivity << "\n"; out << "invert_mouse=" << (pendingInvertMouse ? 1 : 0) << "\n"; out << "extended_zoom=" << (pendingExtendedZoom ? 1 : 0) << "\n"; + out << "fov=" << pendingFov << "\n"; // Chat out << "chat_active_tab=" << activeChatTab_ << "\n"; @@ -10992,6 +11010,12 @@ void GameScreen::loadSettings() { else if (key == "mouse_sensitivity") pendingMouseSensitivity = std::clamp(std::stof(val), 0.05f, 1.0f); else if (key == "invert_mouse") pendingInvertMouse = (std::stoi(val) != 0); else if (key == "extended_zoom") pendingExtendedZoom = (std::stoi(val) != 0); + else if (key == "fov") { + pendingFov = std::clamp(std::stof(val), 45.0f, 110.0f); + if (auto* renderer = core::Application::getInstance().getRenderer()) { + if (auto* camera = renderer->getCamera()) camera->setFov(pendingFov); + } + } // Chat else if (key == "chat_active_tab") activeChatTab_ = std::clamp(std::stoi(val), 0, 3); else if (key == "chat_timestamps") chatShowTimestamps_ = (std::stoi(val) != 0);