Update ImguiUI.cpp (#69)

This commit is contained in:
MegaMech
2024-09-10 16:31:42 -06:00
committed by GitHub
parent fa404df377
commit b7bc19cf9d
+14
View File
@@ -2,6 +2,7 @@
#include "UIWidgets.h"
#include "ResolutionEditor.h"
#include "GameInfoWindow.h"
#include "MultiplayerWindow.h"
#include "FreecamWindow.h"
#include <spdlog/spdlog.h>
@@ -23,6 +24,7 @@ std::shared_ptr<Ship::GuiWindow> mStatsWindow;
std::shared_ptr<Ship::GuiWindow> mInputEditorWindow;
std::shared_ptr<Ship::GuiWindow> mGfxDebuggerWindow;
std::shared_ptr<Ship::GuiWindow> mGameInfoWindow;
std::shared_ptr<Ship::GuiWindow> mMultiplayerWindow;
std::shared_ptr<Ship::GuiWindow> mFreecamWindow;
std::shared_ptr<AdvancedResolutionSettings::AdvancedResolutionSettingsWindow> mAdvancedResolutionSettingsWindow;
@@ -37,6 +39,11 @@ void SetupGuiElements() {
mGameMenuBar = std::make_shared<GameMenuBar>("gOpenMenuBar", CVarGetInteger("gOpenMenuBar", 0));
gui->SetMenuBar(mGameMenuBar);
mMultiplayerWindow = gui->GetGuiWindow("Multiplayer");
if (mMultiplayerWindow == nullptr) {
SPDLOG_ERROR("Could not find multiplayer window");
}
mGameInfoWindow = gui->GetGuiWindow("GameInfo");
if (mGameInfoWindow == nullptr) {
SPDLOG_ERROR("Could not find game info window");
@@ -63,6 +70,9 @@ void SetupGuiElements() {
SPDLOG_ERROR("Could not find input GfxDebuggerWindow");
}
mMultiplayerWindow = std::make_shared<Multiplayer::MultiplayerWindow>("gMultiplayerWindowEnabled", "Multiplayer");
gui->AddGuiWindow(mMultiplayerWindow);
mFreecamWindow = gui->GetGuiWindow("FreecamWindow");
if (mFreecamWindow == nullptr) {
SPDLOG_ERROR("Could not find input FreecamWindow");
@@ -455,6 +465,10 @@ void DrawGameMenu() {
void DrawEnhancementsMenu() {
if (UIWidgets::BeginMenu("Enhancements")) {
UIWidgets::WindowButton("Multiplayer", "gMultiplayerWindowEnabled", GameUI::mMultiplayerWindow,
{ .tooltip = "Shows the multiplayer window" });
if (UIWidgets::BeginMenu("Gameplay")) {
UIWidgets::CVarCheckbox("No Level of Detail (LOD)", "gDisableLOD",
{ .tooltip = "Disable Level of Detail (LOD) to avoid models using "