From 28524cb2a78725bbe65c5efd0d29776eb18645e8 Mon Sep 17 00:00:00 2001 From: EricPlayZ Date: Tue, 9 Jan 2024 02:29:23 +0200 Subject: [PATCH] modified default menu transparency, sorted the World menu a bit :) --- DL2GameOverhaulScript/source/config/config.cpp | 4 ++-- DL2GameOverhaulScript/source/menu/menu.cpp | 2 +- DL2GameOverhaulScript/source/menu/world.cpp | 8 +++++--- 3 files changed, 8 insertions(+), 6 deletions(-) diff --git a/DL2GameOverhaulScript/source/config/config.cpp b/DL2GameOverhaulScript/source/config/config.cpp index 8eea56d..f9ef8ca 100644 --- a/DL2GameOverhaulScript/source/config/config.cpp +++ b/DL2GameOverhaulScript/source/config/config.cpp @@ -4076,7 +4076,7 @@ namespace Config { static void LoadDefaultConfig() { reader = inih::INIReader(); - reader.InsertEntry("Menu", "Transparency", 99.5f); + reader.InsertEntry("Menu", "Transparency", 99.0f); reader.InsertEntry("Menu:Keybinds", "ToggleKey", "VK_F5"); menuToggleKey = VK_F5; @@ -4121,7 +4121,7 @@ namespace Config { try { reader = inih::INIReader(configFileName); - Menu::transparency = reader.Get("Menu", "Transparency", 99.5f); + Menu::transparency = reader.Get("Menu", "Transparency", 99.0f); const std::string toggleKey = reader.Get("Menu:Keybinds", "ToggleKey"); auto it = virtualKeyCodes.find(toggleKey); diff --git a/DL2GameOverhaulScript/source/menu/menu.cpp b/DL2GameOverhaulScript/source/menu/menu.cpp index c6b1ca5..a2d39b8 100644 --- a/DL2GameOverhaulScript/source/menu/menu.cpp +++ b/DL2GameOverhaulScript/source/menu/menu.cpp @@ -9,7 +9,7 @@ namespace Menu { static const ImVec2 maxWndSize = ImVec2(900.0f, 675.0f); bool isOpen = false; - float transparency = 99.5f; + float transparency = 99.0f; void Render() { ImGuiStyle* style = &ImGui::GetStyle(); diff --git a/DL2GameOverhaulScript/source/menu/world.cpp b/DL2GameOverhaulScript/source/menu/world.cpp index 7328724..c486d0f 100644 --- a/DL2GameOverhaulScript/source/menu/world.cpp +++ b/DL2GameOverhaulScript/source/menu/world.cpp @@ -18,6 +18,7 @@ namespace Menu { void Render() { GamePH::DayNightCycle* dayNightCycle = GamePH::DayNightCycle::Get(); + ImGui::SeparatorText("Misc##World"); ImGui::BeginDisabled(!Engine::CBulletPhysicsCharacter::Get() || !dayNightCycle || dayNightCycle->time1 == 0.0f); { if (ImGui::SliderFloat("Time", &time, 0.01f, 24.0f, "%.2f", ImGuiSliderFlags_AlwaysClamp) && dayNightCycle) dayNightCycle->SetDaytime(time); @@ -28,12 +29,13 @@ namespace Menu { GamePH::TimeWeather::CSystem* timeWeatherSystem = GamePH::TimeWeather::CSystem::Get(); const bool weatherDisabledFlag = !Engine::CBulletPhysicsCharacter::Get() || !timeWeatherSystem; - ImGui::BeginDisabled(weatherDisabledFlag); { - ImGui::Text("Setting weather to: %s", !weatherDisabledFlag ? weatherItems[weather] : ""); - ImGui::Text("Current weather: %s", !weatherDisabledFlag ? weatherItems[timeWeatherSystem->GetCurrentWeather() + 1] : ""); + ImGui::SeparatorText("Weather"); + ImGui::BeginDisabled(weatherDisabledFlag); { if (ImGui::Combo("Weather", reinterpret_cast(&weather), weatherItems, IM_ARRAYSIZE(weatherItems)) && timeWeatherSystem) timeWeatherSystem->SetForcedWeather(static_cast(weather - 1)); + ImGui::Text("Setting weather to: %s", !weatherDisabledFlag ? weatherItems[weather] : ""); + ImGui::Text("Current weather: %s", !weatherDisabledFlag ? weatherItems[timeWeatherSystem->GetCurrentWeather() + 1] : ""); ImGui::EndDisabled(); } }