GUI: add option to capitalize menu bar

This commit is contained in:
tildearrow 2023-08-09 22:47:06 -05:00
parent 903fb33350
commit acc74df293
3 changed files with 15 additions and 5 deletions

View file

@ -3918,7 +3918,7 @@ bool FurnaceGUI::loop() {
if (!mobileUI) {
ImGui::BeginMainMenuBar();
if (ImGui::BeginMenu("file")) {
if (ImGui::BeginMenu(settings.capitalMenuBar?"File":"file")) {
if (ImGui::MenuItem("new...",BIND_FOR(GUI_ACTION_NEW))) {
if (modified) {
showWarning("Unsaved changes! Save changes before creating a new song?",GUI_WARN_NEW);
@ -4243,7 +4243,7 @@ bool FurnaceGUI::loop() {
} else {
exitDisabledTimer=0;
}
if (ImGui::BeginMenu("edit")) {
if (ImGui::BeginMenu(settings.capitalMenuBar?"Edit":"edit")) {
ImGui::Text("...");
ImGui::Separator();
if (ImGui::MenuItem("undo",BIND_FOR(GUI_ACTION_UNDO))) doUndo();
@ -4256,7 +4256,7 @@ bool FurnaceGUI::loop() {
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("settings")) {
if (ImGui::BeginMenu(settings.capitalMenuBar?"Settings":"settings")) {
#ifndef IS_MOBILE
if (ImGui::MenuItem("full screen",BIND_FOR(GUI_ACTION_FULLSCREEN),fullScreen)) {
doAction(GUI_ACTION_FULLSCREEN);
@ -4292,7 +4292,7 @@ bool FurnaceGUI::loop() {
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("window")) {
if (ImGui::BeginMenu(settings.capitalMenuBar?"Window":"window")) {
if (ImGui::MenuItem("song information",BIND_FOR(GUI_ACTION_WINDOW_SONG_INFO),songInfoOpen)) songInfoOpen=!songInfoOpen;
if (ImGui::MenuItem("subsongs",BIND_FOR(GUI_ACTION_WINDOW_SUBSONGS),subSongsOpen)) subSongsOpen=!subSongsOpen;
if (ImGui::MenuItem("speed",BIND_FOR(GUI_ACTION_WINDOW_SPEED),speedOpen)) speedOpen=!speedOpen;
@ -4334,7 +4334,7 @@ bool FurnaceGUI::loop() {
ImGui::EndMenu();
}
if (ImGui::BeginMenu("help")) {
if (ImGui::BeginMenu(settings.capitalMenuBar?"Help":"help")) {
if (ImGui::MenuItem("effect list",BIND_FOR(GUI_ACTION_WINDOW_EFFECT_LIST),effectListOpen)) effectListOpen=!effectListOpen;
if (ImGui::MenuItem("debug menu",BIND_FOR(GUI_ACTION_WINDOW_DEBUG))) debugOpen=!debugOpen;
if (ImGui::MenuItem("inspector",BIND_FOR(GUI_ACTION_WINDOW_DEBUG))) inspectorOpen=!inspectorOpen;

View file

@ -1549,6 +1549,7 @@ class FurnaceGUI {
int removeVolOff;
int playOnLoad;
int insTypeMenu;
int capitalMenuBar;
unsigned int maxUndoSteps;
String mainFontPath;
String headFontPath;
@ -1712,6 +1713,7 @@ class FurnaceGUI {
removeVolOff(0),
playOnLoad(0),
insTypeMenu(1),
capitalMenuBar(0),
maxUndoSteps(100),
mainFontPath(""),
headFontPath(""),

View file

@ -2060,6 +2060,11 @@ void FurnaceGUI::drawSettings() {
}
ImGui::Unindent();
bool capitalMenuBarB=settings.capitalMenuBar;
if (ImGui::Checkbox("Capitalize menu bar",&capitalMenuBarB)) {
settings.capitalMenuBar=capitalMenuBarB;
}
// SUBSECTION ORDERS
CONFIG_SUBSECTION("Orders");
// sorry. temporarily disabled until ImGui has a way to add separators in tables arbitrarily.
@ -3024,6 +3029,7 @@ void FurnaceGUI::syncSettings() {
settings.removeVolOff=e->getConfInt("removeVolOff",0);
settings.playOnLoad=e->getConfInt("playOnLoad",0);
settings.insTypeMenu=e->getConfInt("insTypeMenu",1);
settings.capitalMenuBar=e->getConfInt("capitalMenuBar",0);
clampSetting(settings.mainFontSize,2,96);
clampSetting(settings.headFontSize,2,96);
@ -3159,6 +3165,7 @@ void FurnaceGUI::syncSettings() {
clampSetting(settings.removeVolOff,0,1);
clampSetting(settings.playOnLoad,0,2);
clampSetting(settings.insTypeMenu,0,1);
clampSetting(settings.capitalMenuBar,0,1);
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
@ -3394,6 +3401,7 @@ void FurnaceGUI::commitSettings() {
e->setConf("removeVolOff",settings.removeVolOff);
e->setConf("playOnLoad",settings.playOnLoad);
e->setConf("insTypeMenu",settings.insTypeMenu);
e->setConf("capitalMenuBar",settings.capitalMenuBar);
// colors
for (int i=0; i<GUI_COLOR_MAX; i++) {