Skip to content

Commit

Permalink
Change SoH Input Editor CVar to CVAR_WINDOW and remove definition for…
Browse files Browse the repository at this point in the history
… LUS's input editor CVar from the cmake. (HarbourMasters#4438)
  • Loading branch information
Malkierian authored Oct 18, 2024
1 parent 7e78abf commit a7cb7da
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
1 change: 0 additions & 1 deletion CMake/lus-cvars.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@ set(CVAR_SDL_WINDOWED_FULLSCREEN "${CVAR_PREFIX_SETTING}.SdlWindowedFullscreen"
set(CVAR_TEXTURE_FILTER "${CVAR_PREFIX_SETTING}.TextureFilter" CACHE STRING "")
set(CVAR_IMGUI_CONTROLLER_NAV "${CVAR_PREFIX_SETTING}.ControlNav" CACHE STRING "")
set(CVAR_CONSOLE_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.Console" CACHE STRING "")
set(CVAR_CONTROLLER_CONFIGURATION_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.ControllerConfiguration" CACHE STRING "")
set(CVAR_CONTROLLER_DISCONNECTED_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.ControllerDisconnected" CACHE STRING "")
set(CVAR_CONTROLLER_REORDERING_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.ControllerReordering" CACHE STRING "")
set(CVAR_GFX_DEBUGGER_WINDOW_OPEN "${CVAR_PREFIX_WINDOW}.GfxDebugger" CACHE STRING "")
Expand Down
4 changes: 2 additions & 2 deletions soh/soh/OTRGlobals.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -348,7 +348,7 @@ OTRGlobals::OTRGlobals() {
context->InitCrashHandler();
context->InitConsole();

auto sohInputEditorWindow = std::make_shared<SohInputEditorWindow>(CVAR_CONTROLLER_CONFIGURATION_WINDOW_OPEN, "Controller Configuration");
auto sohInputEditorWindow = std::make_shared<SohInputEditorWindow>(CVAR_WINDOW("ControllerConfiguration"), "Controller Configuration");
context->InitWindow({ sohInputEditorWindow });

auto overlay = context->GetInstance()->GetWindow()->GetGui()->GetGameOverlay();
Expand Down Expand Up @@ -2281,7 +2281,7 @@ extern "C" void OTRControllerCallback(uint8_t rumble) {

static std::shared_ptr<SohInputEditorWindow> controllerConfigWindow = nullptr;
if (controllerConfigWindow == nullptr) {
controllerConfigWindow = std::dynamic_pointer_cast<SohInputEditorWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Input Editor"));
controllerConfigWindow = std::dynamic_pointer_cast<SohInputEditorWindow>(Ship::Context::GetInstance()->GetWindow()->GetGui()->GetGuiWindow("Controller Configuration"));
} else if (controllerConfigWindow->TestingRumble()) {
return;
}
Expand Down
2 changes: 1 addition & 1 deletion soh/soh/SohMenuBar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@ void DrawSettingsMenu() {
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
if (mInputEditorWindow) {
if (ImGui::Button(GetWindowButtonText("Controller Mapping", CVarGetInteger(CVAR_CONTROLLER_CONFIGURATION_WINDOW_OPEN, 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
if (ImGui::Button(GetWindowButtonText("Controller Mapping", CVarGetInteger(CVAR_WINDOW("ControllerConfiguration"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
mInputEditorWindow->ToggleVisibility();
}
}
Expand Down

0 comments on commit a7cb7da

Please sign in to comment.