summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJordan Longstaff <JordanLongstaff@users.noreply.github.com>2025-05-01 22:00:43 -0400
committerGitHub <noreply@github.com>2025-05-01 19:00:43 -0700
commitbc3b17f4abdae665b0aafbd7b877a110efe90695 (patch)
tree5e9386fed34986fd9e776cdfe5fb0b9743121bab
parentbaa91cbadbd357dfb3244fa53322b77f10161016 (diff)
Add coloured text as current BGM indicator in Audio Editor (#5392)
-rw-r--r--soh/soh/Enhancements/audio/AudioEditor.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/soh/soh/Enhancements/audio/AudioEditor.cpp b/soh/soh/Enhancements/audio/AudioEditor.cpp
index 9865615bd..4cf1f389d 100644
--- a/soh/soh/Enhancements/audio/AudioEditor.cpp
+++ b/soh/soh/Enhancements/audio/AudioEditor.cpp
@@ -265,6 +265,9 @@ void Draw_SfxTab(const std::string& tabId, SeqType type, const std::string& tabN
}
}
+ auto playingFromMenu = CVarGetInteger(CVAR_AUDIO("Playing"), 0);
+ auto currentBGM = func_800FA0B4(SEQ_PLAYER_BGM_MAIN);
+
// Longest text in Audio Editor
ImVec2 columnSize = ImGui::CalcTextSize("Navi - Look/Hey/Watchout (Target Enemy)");
ImGui::BeginTable(tabId.c_str(), 3, ImGuiTableFlags_SizingFixedFit);
@@ -291,10 +294,13 @@ void Draw_SfxTab(const std::string& tabId, SeqType type, const std::string& tabN
const std::string lockedButton = ICON_FA_LOCK + hiddenKey;
const std::string unlockedButton = ICON_FA_UNLOCK + hiddenKey;
const int currentValue = CVarGetInteger(cvarKey.c_str(), defaultValue);
+ const bool isCurrentlyPlaying = currentValue == playingFromMenu || seqData.sequenceId == currentBGM;
ImGui::TableNextRow();
ImGui::TableNextColumn();
- ImGui::Text("%s", seqData.label.c_str());
+ ImGui::TextColored(
+ UIWidgets::ColorValues.at(isCurrentlyPlaying ? UIWidgets::Colors::Yellow : UIWidgets::Colors::White), "%s",
+ seqData.label.c_str());
ImGui::TableNextColumn();
ImGui::PushItemWidth(-FLT_MIN);
const int initialValue = map.contains(currentValue) ? currentValue : defaultValue;