mirror of
https://github.com/HarbourMasters/Shipwright
synced 2026-08-17 05:41:46 -04:00
support lus renamespacing (#4075)
This commit is contained in:
+10
-10
@@ -208,7 +208,7 @@ namespace UIWidgets {
|
||||
bool val = (bool)CVarGetInteger(cvarName, defaultValue);
|
||||
if (CustomCheckbox(text, &val, disabled, disabledGraphic)) {
|
||||
CVarSetInteger(cvarName, val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
|
||||
@@ -248,7 +248,7 @@ namespace UIWidgets {
|
||||
CVarSetInteger(cvarName, i);
|
||||
selected = i;
|
||||
changed = true;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -261,7 +261,7 @@ namespace UIWidgets {
|
||||
if (disabledValue >= 0 && selected != disabledValue) {
|
||||
CVarSetInteger(cvarName, disabledValue);
|
||||
changed = true;
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
}
|
||||
}
|
||||
|
||||
@@ -351,7 +351,7 @@ namespace UIWidgets {
|
||||
|
||||
if (changed && (oldVal != val)) {
|
||||
CVarSetInteger(cvarName, val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
@@ -452,7 +452,7 @@ namespace UIWidgets {
|
||||
ss << std::setprecision(ticks + 1) << std::setiosflags(std::ios_base::fixed) << val;
|
||||
val = std::stof(ss.str());
|
||||
CVarSetFloat(cvarName, val);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
} else {
|
||||
changed = false;
|
||||
}
|
||||
@@ -501,7 +501,7 @@ namespace UIWidgets {
|
||||
int val = CVarGetInteger(cvarName, 0);
|
||||
if (ImGui::RadioButton(make_invisible.c_str(), id == val)) {
|
||||
CVarSetInteger(cvarName, id);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
ret = true;
|
||||
}
|
||||
ImGui::SameLine();
|
||||
@@ -528,7 +528,7 @@ namespace UIWidgets {
|
||||
|
||||
CVarSetColor(cvarName, colorsRGBA);
|
||||
CVarSetInteger(Cvar_RBM.c_str(), 0); //On click disable rainbow mode.
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
Tooltip("Revert colors to the game's original colors (GameCube version)\nOverwrites previously chosen color");
|
||||
@@ -553,7 +553,7 @@ namespace UIWidgets {
|
||||
NewColors.b = fmin(fmax(colors->z * 255, 0), 255);
|
||||
CVarSetColor(cvarName, NewColors);
|
||||
CVarSetInteger(Cvar_RBM.c_str(), 0); // On click disable rainbow mode.
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
Tooltip("Chooses a random color\nOverwrites previously chosen color");
|
||||
@@ -614,7 +614,7 @@ namespace UIWidgets {
|
||||
colors.a = 255.0;
|
||||
|
||||
CVarSetColor(cvarName, colors);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
@@ -630,7 +630,7 @@ namespace UIWidgets {
|
||||
colors.a = ColorRGBA.w * 255.0;
|
||||
|
||||
CVarSetColor(cvarName, colors);
|
||||
LUS::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
Ship::Context::GetInstance()->GetWindow()->GetGui()->SaveConsoleVariablesOnNextTick();
|
||||
changed = true;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user