mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-24 13:35:11 +00:00
GUI: add option to capitalize menu bar
This commit is contained in:
parent
903fb33350
commit
acc74df293
3 changed files with 15 additions and 5 deletions
|
@ -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;
|
||||
|
|
|
@ -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(""),
|
||||
|
|
|
@ -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++) {
|
||||
|
|
Loading…
Reference in a new issue