mirror of
https://github.com/HarbourMasters/Shipwright.git
synced 2025-04-28 13:17:58 +03:00
Merge 47594d486e
into fec676bbf8
This commit is contained in:
commit
8d1aba651c
1 changed files with 7 additions and 1 deletions
|
@ -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
|
// Longest text in Audio Editor
|
||||||
ImVec2 columnSize = ImGui::CalcTextSize("Navi - Look/Hey/Watchout (Target Enemy)");
|
ImVec2 columnSize = ImGui::CalcTextSize("Navi - Look/Hey/Watchout (Target Enemy)");
|
||||||
ImGui::BeginTable(tabId.c_str(), 3, ImGuiTableFlags_SizingFixedFit);
|
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 lockedButton = ICON_FA_LOCK + hiddenKey;
|
||||||
const std::string unlockedButton = ICON_FA_UNLOCK + hiddenKey;
|
const std::string unlockedButton = ICON_FA_UNLOCK + hiddenKey;
|
||||||
const int currentValue = CVarGetInteger(cvarKey.c_str(), defaultValue);
|
const int currentValue = CVarGetInteger(cvarKey.c_str(), defaultValue);
|
||||||
|
const bool isCurrentlyPlaying = currentValue == playingFromMenu || seqData.sequenceId == currentBGM;
|
||||||
|
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
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::TableNextColumn();
|
||||||
ImGui::PushItemWidth(-FLT_MIN);
|
ImGui::PushItemWidth(-FLT_MIN);
|
||||||
const int initialValue = map.contains(currentValue) ? currentValue : defaultValue;
|
const int initialValue = map.contains(currentValue) ? currentValue : defaultValue;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue