Step 2 of CVar macro/sectionalizing: Trackers/Windows (#3238)
* Add all macros. Replace all randomizer seed setting CVars with appropriate macro. Cleaned up non-gameplay-critical things that are part of Spock Race rando presets (like RTA timing, displaying timer, displaying the glitch lineup tick, or Fast File Select). * Wrong slash... * Fix DEVELOPER_CVAR macro. Add GENERAL_CVAR macro. * Change Item Tracker CVars, including open window CVar. * Swapped open window CVars. * Swapped Entrance Tracker CVars. * Swapped Check Tracker CVars. Changed Item Tracker "HudEditMode" to "Draggable". * Renamed `RANDOMIZER_CVAR` to `RANDO_ENHANCEMENT_CVAR`. Swapped rando enhancement CVars. * Mirroring last commit from part 1 in randomizer.cpp * Another mirror from pt 1
This commit is contained in:
@@ -248,12 +248,12 @@ void DrawSettingsMenu() {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
|
||||
if (mInputViewer) {
|
||||
if (ImGui::Button(GetWindowButtonText("Input Viewer", CVarGetInteger("gOpenWindows.InputViewer", 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Input Viewer", CVarGetInteger(WINDOW_CVAR("InputViewer"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
|
||||
mInputViewer->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
if (mInputViewerSettings) {
|
||||
if (ImGui::Button(GetWindowButtonText("Input Viewer Settings", CVarGetInteger("gOpenWindows.InputViewerSettings", 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Input Viewer Settings", CVarGetInteger(WINDOW_CVAR("InputViewerSettings"), 0)).c_str(), ImVec2 (-1.0f, 0.0f))) {
|
||||
mInputViewerSettings->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
@@ -287,7 +287,7 @@ void DrawSettingsMenu() {
|
||||
ImGui::PushStyleVar(ImGuiStyleVar_FrameBorderSize, 1.0f);
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
|
||||
UIWidgets::Spacer(0);
|
||||
if (ImGui::Button(GetWindowButtonText("Advanced Resolution", CVarGetInteger("gAdvancedResolutionEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Advanced Resolution", CVarGetInteger(WINDOW_CVAR("AdvancedResolutionEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mAdvancedResolutionSettingsWindow->ToggleVisibility();
|
||||
}
|
||||
ImGui::PopStyleColor(1);
|
||||
@@ -1395,19 +1395,19 @@ void DrawEnhancementsMenu() {
|
||||
ImGui::PushStyleColor(ImGuiCol_Border, ImVec4(0.22f, 0.38f, 0.56f, 1.0f));
|
||||
|
||||
if (mCosmeticsEditorWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVarGetInteger("gCosmeticsEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Cosmetics Editor", CVarGetInteger(WINDOW_CVAR("CosmeticsEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mCosmeticsEditorWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
if (mAudioEditorWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Audio Editor", CVarGetInteger("gAudioEditor.WindowOpen", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Audio Editor", CVarGetInteger(WINDOW_CVAR("AudioEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mAudioEditorWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
if (mGameplayStatsWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Gameplay Stats", CVarGetInteger("gGameplayStatsEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Gameplay Stats", CVarGetInteger(WINDOW_CVAR("GameplayStats"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mGameplayStatsWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
@@ -1692,37 +1692,37 @@ void DrawDeveloperToolsMenu() {
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mSaveEditorWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Save Editor", CVarGetInteger("gSaveEditorEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Save Editor", CVarGetInteger(WINDOW_CVAR("SaveEditor"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mSaveEditorWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mColViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVarGetInteger("gCollisionViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Collision Viewer", CVarGetInteger(WINDOW_CVAR("CollisionViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mColViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mActorViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVarGetInteger("gActorViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Actor Viewer", CVarGetInteger(WINDOW_CVAR("ActorViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mActorViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mDLViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Display List Viewer", CVarGetInteger("gDLViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Display List Viewer", CVarGetInteger(WINDOW_CVAR("DLViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mDLViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mValueViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Value Viewer", CVarGetInteger("gValueViewer.WindowOpen", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Value Viewer", CVarGetInteger(WINDOW_CVAR("ValueViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mValueViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mMessageViewerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Message Viewer", CVarGetInteger("gMessageViewerEnabled", 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
if (ImGui::Button(GetWindowButtonText("Message Viewer", CVarGetInteger(WINDOW_CVAR("MessageViewer"), 0)).c_str(), ImVec2(-1.0f, 0.0f))) {
|
||||
mMessageViewerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
@@ -1884,39 +1884,39 @@ void DrawRandomizerMenu() {
|
||||
static ImVec2 buttonSize(200.0f, 0.0f);
|
||||
#endif
|
||||
if (mRandomizerSettingsWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Randomizer Settings", CVarGetInteger("gRandomizerSettingsEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Randomizer Settings", CVarGetInteger(WINDOW_CVAR("RandomizerSettings"), 0)).c_str(), buttonSize)) {
|
||||
mRandomizerSettingsWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
if (mItemTrackerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger("gItemTrackerEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Item Tracker", CVarGetInteger(WINDOW_CVAR("ItemTracker"), 0)).c_str(), buttonSize)) {
|
||||
mItemTrackerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
|
||||
UIWidgets::Spacer(0);
|
||||
if (mItemTrackerSettingsWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger("gItemTrackerSettingsEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Item Tracker Settings", CVarGetInteger(WINDOW_CVAR("ItemTrackerSettings"), 0)).c_str(), buttonSize)) {
|
||||
mItemTrackerSettingsWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mEntranceTrackerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger("gEntranceTrackerEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Entrance Tracker", CVarGetInteger(WINDOW_CVAR("EntranceTracker"), 0)).c_str(), buttonSize)) {
|
||||
mEntranceTrackerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mCheckTrackerWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger("gCheckTrackerEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Check Tracker", CVarGetInteger(WINDOW_CVAR("CheckTracker"), 0)).c_str(), buttonSize)) {
|
||||
mCheckTrackerWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
UIWidgets::Spacer(0);
|
||||
if (mCheckTrackerSettingsWindow) {
|
||||
if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger("gCheckTrackerSettingsEnabled", 0)).c_str(), buttonSize)) {
|
||||
if (ImGui::Button(GetWindowButtonText("Check Tracker Settings", CVarGetInteger(WINDOW_CVAR("CheckTrackerSettings"), 0)).c_str(), buttonSize)) {
|
||||
mCheckTrackerSettingsWindow->ToggleVisibility();
|
||||
}
|
||||
}
|
||||
@@ -1927,11 +1927,11 @@ void DrawRandomizerMenu() {
|
||||
|
||||
if (ImGui::BeginMenu("Rando Enhancements"))
|
||||
{
|
||||
UIWidgets::EnhancementCheckbox("Rando-Relevant Navi Hints", "gRandoRelevantNavi", false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::EnhancementCheckbox("Rando-Relevant Navi Hints", RANDO_ENHANCEMENT_CVAR("RandoRelevantNavi"), false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip(
|
||||
"Replace Navi's overworld quest hints with rando-related gameplay hints."
|
||||
);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Random Rupee Names", "gRandomizeRupeeNames", true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Random Rupee Names", RANDO_ENHANCEMENT_CVAR("RandomizeRupeeNames"), true, false, false, "", UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip(
|
||||
"When obtaining rupees, randomize what the rupee is called in the textbox."
|
||||
);
|
||||
@@ -1957,13 +1957,13 @@ void DrawRandomizerMenu() {
|
||||
"This setting is disabled because a savefile is loaded without any key\n"
|
||||
"shuffle settings set to \"Any Dungeon\", \"Overworld\" or \"Anywhere\"";
|
||||
|
||||
UIWidgets::PaddedEnhancementCheckbox("Key Colors Match Dungeon", "gRandoMatchKeyColors", true, false,
|
||||
UIWidgets::PaddedEnhancementCheckbox("Key Colors Match Dungeon", RANDO_ENHANCEMENT_CVAR("MatchKeyColors"), true, false,
|
||||
disableKeyColors, disableKeyColorsText, UIWidgets::CheckboxGraphics::Cross, true);
|
||||
UIWidgets::Tooltip(
|
||||
"Matches the color of small keys and boss keys to the dungeon they belong to. "
|
||||
"This helps identify keys from afar and adds a little bit of flair.\n\nThis only "
|
||||
"applies to seeds with keys and boss keys shuffled to Any Dungeon, Overworld, or Anywhere.");
|
||||
UIWidgets::PaddedEnhancementCheckbox("Quest Item Fanfares", "gRandoQuestItemFanfares", true, false);
|
||||
UIWidgets::PaddedEnhancementCheckbox("Quest Item Fanfares", RANDO_ENHANCEMENT_CVAR("QuestItemFanfares"), true, false);
|
||||
UIWidgets::Tooltip(
|
||||
"Play unique fanfares when obtaining quest items "
|
||||
"(medallions/stones/songs). Note that these fanfares are longer than usual."
|
||||
|
||||
Reference in New Issue
Block a user