mirror of
https://github.com/EricPlayZ/EGameTools.git
synced 2025-07-18 17:37:53 +08:00
modified default menu transparency, sorted the World menu a bit :)
This commit is contained in:
@ -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<float>("Menu", "Transparency", 99.5f);
|
||||
Menu::transparency = reader.Get<float>("Menu", "Transparency", 99.0f);
|
||||
|
||||
const std::string toggleKey = reader.Get<std::string>("Menu:Keybinds", "ToggleKey");
|
||||
auto it = virtualKeyCodes.find(toggleKey);
|
||||
|
@ -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();
|
||||
|
@ -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<int*>(&weather), weatherItems, IM_ARRAYSIZE(weatherItems)) && timeWeatherSystem)
|
||||
timeWeatherSystem->SetForcedWeather(static_cast<EWeather::TYPE>(weather - 1));
|
||||
ImGui::Text("Setting weather to: %s", !weatherDisabledFlag ? weatherItems[weather] : "");
|
||||
ImGui::Text("Current weather: %s", !weatherDisabledFlag ? weatherItems[timeWeatherSystem->GetCurrentWeather() + 1] : "");
|
||||
ImGui::EndDisabled();
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user