GUI: add option for playback status in menu bar

This commit is contained in:
tildearrow 2024-02-11 18:54:45 -05:00
parent 2f72e75f0e
commit a05b133b3a
3 changed files with 12 additions and 1 deletions

View file

@ -4428,7 +4428,7 @@ bool FurnaceGUI::loop() {
ImGui::EndMenu();
}
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PLAYBACK_STAT]);
if (e->isPlaying()) {
if (e->isPlaying() && settings.playbackTime) {
int totalTicks=e->getTotalTicks();
int totalSeconds=e->getTotalSeconds();

View file

@ -1774,6 +1774,7 @@ class FurnaceGUI {
int fontAntiAlias;
int selectAssetOnLoad;
int basicColors;
int playbackTime;
unsigned int maxUndoSteps;
String mainFontPath;
String headFontPath;
@ -1973,6 +1974,7 @@ class FurnaceGUI {
fontAntiAlias(1),
selectAssetOnLoad(1),
basicColors(1),
playbackTime(1),
maxUndoSteps(100),
mainFontPath(""),
headFontPath(""),

View file

@ -2673,6 +2673,12 @@ void FurnaceGUI::drawSettings() {
}
ImGui::Unindent();
bool playbackTimeB=settings.playbackTime;
if (ImGui::Checkbox("Display playback status when playing",&playbackTimeB)) {
settings.playbackTime=playbackTimeB;
settingsChanged=true;
}
ImGui::Text("Export options layout:");
ImGui::Indent();
if (ImGui::RadioButton("Sub-menus in File menu##eol0",settings.exportOptionsLayout==0)) {
@ -3996,6 +4002,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
settings.orderRowsBase=conf.getInt("orderRowsBase",1);
settings.fmNames=conf.getInt("fmNames",0);
settings.statusDisplay=conf.getInt("statusDisplay",0);
settings.playbackTime=conf.getInt("playbackTime",1);
settings.viewPrevPattern=conf.getInt("viewPrevPattern",1);
settings.susPosition=conf.getInt("susPosition",0);
@ -4237,6 +4244,7 @@ void FurnaceGUI::readConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
clampSetting(settings.fontAntiAlias,0,1);
clampSetting(settings.selectAssetOnLoad,0,1);
clampSetting(settings.basicColors,0,1);
clampSetting(settings.playbackTime,0,1);
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
@ -4458,6 +4466,7 @@ void FurnaceGUI::writeConfig(DivConfig& conf, FurnaceGUISettingGroups groups) {
conf.set("orderRowsBase",settings.orderRowsBase);
conf.set("fmNames",settings.fmNames);
conf.set("statusDisplay",settings.statusDisplay);
conf.set("playbackTime",settings.playbackTime);
conf.set("viewPrevPattern",settings.viewPrevPattern);
conf.set("susPosition",settings.susPosition);