GUI: prepare for new settings layout

This commit is contained in:
tildearrow 2023-07-29 04:21:27 -05:00
parent 1aef0079d1
commit 92493485a3

View file

@ -236,6 +236,27 @@ const char* specificControls[18]={
} \ } \
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) actionKeys[what]=0; if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) actionKeys[what]=0;
#define CONFIG_SUBSECTION(what) \
if (_subInit) { \
ImGui::Separator(); \
} else { \
_subInit=true; \
} \
ImGui::PushFont(bigFont); \
ImGui::TextUnformatted(what); \
ImGui::PopFont();
#define CONFIG_SECTION(what) \
if (ImGui::BeginTabItem(what)) { \
bool _subInit=false; \
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); \
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; \
if (ImGui::BeginChild("SettingsView",settingsViewSize))
#define END_SECTION } \
ImGui::EndChild(); \
ImGui::EndTabItem();
String stripName(String what) { String stripName(String what) {
String ret; String ret;
for (char& i: what) { for (char& i: what) {
@ -286,26 +307,146 @@ void FurnaceGUI::drawSettings() {
showWarning("Do you want to save your settings?",GUI_WARN_CLOSE_SETTINGS); showWarning("Do you want to save your settings?",GUI_WARN_CLOSE_SETTINGS);
} }
if (ImGui::BeginTabBar("settingsTab")) { if (ImGui::BeginTabBar("settingsTab")) {
if (ImGui::BeginTabItem("General")) { // NEW SETTINGS HERE
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); CONFIG_SECTION("General") {
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; // SUBSECTION PROGRAM
if (ImGui::BeginChild("SettingsView",settingsViewSize)) { CONFIG_SUBSECTION("Program");
ImGui::Text("Workspace layout:"); String curRenderBackend=settings.renderBackend.empty()?GUI_BACKEND_DEFAULT_NAME:settings.renderBackend;
ImGui::SameLine(); if (ImGui::BeginCombo("Render backend",curRenderBackend.c_str())) {
if (ImGui::Button("Import")) { #ifdef HAVE_RENDER_SDL
openFileDialog(GUI_FILE_IMPORT_LAYOUT); if (ImGui::Selectable("SDL Renderer",curRenderBackend=="SDL")) {
settings.renderBackend="SDL";
} }
ImGui::SameLine(); #endif
if (ImGui::Button("Export")) { #ifdef HAVE_RENDER_DX11
openFileDialog(GUI_FILE_EXPORT_LAYOUT); if (ImGui::Selectable("DirectX 11",curRenderBackend=="DirectX 11")) {
settings.renderBackend="DirectX 11";
}
#endif
#ifdef HAVE_RENDER_GL
if (ImGui::Selectable("OpenGL",curRenderBackend=="OpenGL")) {
settings.renderBackend="OpenGL";
}
#endif
ImGui::EndCombo();
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("you may need to restart Furnace for this setting to take effect.");
}
if (curRenderBackend=="SDL") {
if (ImGui::BeginCombo("Render driver",settings.renderDriver.empty()?"Automatic":settings.renderDriver.c_str())) {
if (ImGui::Selectable("Automatic",settings.renderDriver.empty())) {
settings.renderDriver="";
}
for (String& i: availRenderDrivers) {
if (ImGui::Selectable(i.c_str(),i==settings.renderDriver)) {
settings.renderDriver=i;
}
}
ImGui::EndCombo();
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("you may need to restart Furnace for this setting to take effect.");
} }
ImGui::SameLine();
if (ImGui::Button("Reset")) {
showWarning("Are you sure you want to reset the workspace layout?",GUI_WARN_RESET_LAYOUT);
} }
ImGui::Separator(); bool renderClearPosB=settings.renderClearPos;
if (ImGui::Checkbox("Late render clear",&renderClearPosB)) {
settings.renderClearPos=renderClearPosB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("calls rend->clear() after rend->present(). might reduce UI latency by one frame in some drivers.");
}
bool powerSaveB=settings.powerSave;
if (ImGui::Checkbox("Power-saving mode",&powerSaveB)) {
settings.powerSave=powerSaveB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("saves power by lowering the frame rate to 2fps when idle.\nmay cause issues under Mesa drivers!");
}
#ifndef IS_MOBILE
bool noThreadedInputB=settings.noThreadedInput;
if (ImGui::Checkbox("Disable threaded input (restart after changing!)",&noThreadedInputB)) {
settings.noThreadedInput=noThreadedInputB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("threaded input processes key presses for note preview on a separate thread (on supported platforms), which reduces latency.\nhowever, crashes have been reported when threaded input is on. enable this option if that is the case.");
}
#endif
bool eventDelayB=settings.eventDelay;
if (ImGui::Checkbox("Enable event delay",&eventDelayB)) {
settings.eventDelay=eventDelayB;
applyUISettings(false);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("may cause issues with high-polling-rate mice when previewing notes.");
}
// SUBSECTION FILE
CONFIG_SUBSECTION("File");
bool sysFileDialogB=settings.sysFileDialog;
if (ImGui::Checkbox("Use system file picker",&sysFileDialogB)) {
settings.sysFileDialog=sysFileDialogB;
}
if (ImGui::InputInt("Number of recent files",&settings.maxRecentFile)) {
if (settings.maxRecentFile<0) settings.maxRecentFile=0;
if (settings.maxRecentFile>30) settings.maxRecentFile=30;
}
bool compressB=settings.compress;
if (ImGui::Checkbox("Compress when saving",&compressB)) {
settings.compress=compressB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("use zlib to compress saved songs.");
}
bool saveUnusedPatternsB=settings.saveUnusedPatterns;
if (ImGui::Checkbox("Save unused patterns",&saveUnusedPatternsB)) {
settings.saveUnusedPatterns=saveUnusedPatternsB;
}
bool newPatternFormatB=settings.newPatternFormat;
if (ImGui::Checkbox("Use new pattern format when saving",&newPatternFormatB)) {
settings.newPatternFormat=newPatternFormatB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("use a packed format which saves space when saving songs.\ndisable if you need compatibility with older Furnace and/or tools\nwhich do not support this format.");
}
bool noDMFCompatB=settings.noDMFCompat;
if (ImGui::Checkbox("Don't apply compatibility flags when loading .dmf",&noDMFCompatB)) {
settings.noDMFCompat=noDMFCompatB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("do not report any issues arising from the use of this option!");
}
ImGui::Text("Audio export loop/fade out time:");
if (ImGui::RadioButton("Set to these values on start-up:##fot0",settings.persistFadeOut==0)) {
settings.persistFadeOut=0;
}
ImGui::BeginDisabled(settings.persistFadeOut);
if (ImGui::InputInt("Loops",&settings.exportLoops,1,2)) {
if (exportLoops<0) exportLoops=0;
exportLoops=settings.exportLoops;
}
if (ImGui::InputDouble("Fade out (seconds)",&settings.exportFadeOut,1.0,2.0,"%.1f")) {
if (exportFadeOut<0.0) exportFadeOut=0.0;
exportFadeOut=settings.exportFadeOut;
}
ImGui::EndDisabled();
if (ImGui::RadioButton("Remember last values##fot1",settings.persistFadeOut==1)) {
settings.persistFadeOut=1;
}
// SUBSECTION CHIP
CONFIG_SUBSECTION("Chip");
ImGui::Text("Initial system:"); ImGui::Text("Initial system:");
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button("Current system")) { if (ImGui::Button("Current system")) {
@ -493,8 +634,21 @@ void FurnaceGUI::drawSettings() {
settings.initialSys.set(fmt::sprintf("flags%d",sysCount),""); settings.initialSys.set(fmt::sprintf("flags%d",sysCount),"");
} }
ImGui::Separator(); ImGui::Text("When creating new song:");
if (ImGui::RadioButton("Display system preset selector##NSB0",settings.newSongBehavior==0)) {
settings.newSongBehavior=0;
}
if (ImGui::RadioButton("Start with initial system##NSB1",settings.newSongBehavior==1)) {
settings.newSongBehavior=1;
}
bool restartOnFlagChangeB=settings.restartOnFlagChange;
if (ImGui::Checkbox("Restart song when changing chip properties",&restartOnFlagChangeB)) {
settings.restartOnFlagChange=restartOnFlagChangeB;
}
// SUBSECTION START-UP
CONFIG_SUBSECTION("Start-up");
ImGui::Text("Play intro on start-up:"); ImGui::Text("Play intro on start-up:");
if (ImGui::RadioButton("No##pis0",settings.alwaysPlayIntro==0)) { if (ImGui::RadioButton("No##pis0",settings.alwaysPlayIntro==0)) {
settings.alwaysPlayIntro=0; settings.alwaysPlayIntro=0;
@ -509,13 +663,135 @@ void FurnaceGUI::drawSettings() {
settings.alwaysPlayIntro=3; settings.alwaysPlayIntro=3;
} }
ImGui::Text("When creating new song:"); bool disableFadeInB=settings.disableFadeIn;
if (ImGui::RadioButton("Display system preset selector##NSB0",settings.newSongBehavior==0)) { if (ImGui::Checkbox("Disable fade-in during start-up",&disableFadeInB)) {
settings.newSongBehavior=0; settings.disableFadeIn=disableFadeInB;
} }
if (ImGui::RadioButton("Start with initial system##NSB1",settings.newSongBehavior==1)) {
settings.newSongBehavior=1; bool partyTimeB=settings.partyTime;
if (ImGui::Checkbox("About screen party time",&partyTimeB)) {
settings.partyTime=partyTimeB;
} }
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Warning: may cause epileptic seizures.");
}
// SUBSECTION BEHAVIOR
CONFIG_SUBSECTION("Behavior");
bool blankInsB=settings.blankIns;
if (ImGui::Checkbox("New instruments are blank",&blankInsB)) {
settings.blankIns=blankInsB;
}
END_SECTION;
}
CONFIG_SECTION("Audio/MIDI") {
// SUBSECTION OUTPUT
CONFIG_SUBSECTION("Output");
// SUBSECTION MIXING
CONFIG_SUBSECTION("Mixing");
// SUBSECTION METRONOME
CONFIG_SUBSECTION("Metronome");
// SUBSECTION MIDI
CONFIG_SUBSECTION("MIDI");
END_SECTION;
}
CONFIG_SECTION("Emulation") {
// SUBSECTION LAYOUT
CONFIG_SUBSECTION("Cores");
END_SECTION;
}
CONFIG_SECTION("Keyboard") {
// SUBSECTION LAYOUT
CONFIG_SUBSECTION("Keyboard");
END_SECTION;
}
CONFIG_SECTION("Interface") {
// SUBSECTION LAYOUT
CONFIG_SUBSECTION("Layout");
// SUBSECTION CLICKING
CONFIG_SUBSECTION("Clicking");
// SUBSECTION CURSOR: EDIT
CONFIG_SUBSECTION("Cursor: Edit");
// SUBSECTION CURSOR: MOVE
CONFIG_SUBSECTION("Cursor: Move");
// SUBSECTION SCROLLING
CONFIG_SUBSECTION("Scrolling");
END_SECTION;
}
CONFIG_SECTION("Appearance") {
// SUBSECTION INTERFACE
CONFIG_SUBSECTION("Interface");
// SUBSECTION BARS
CONFIG_SUBSECTION("Bars");
// SUBSECTION ORDERS
CONFIG_SUBSECTION("Orders");
// SUBSECTION PATTERN
CONFIG_SUBSECTION("Pattern");
// SUBSECTION CHANNEL
CONFIG_SUBSECTION("Channel");
// SUBSECTION ASSETS
CONFIG_SUBSECTION("Assets");
// SUBSECTION MACRO EDITOR
CONFIG_SUBSECTION("Macro Editor");
// SUBSECTION WAVE EDITOR
CONFIG_SUBSECTION("Wave Editor");
// SUBSECTION FM EDITOR
CONFIG_SUBSECTION("FM Editor");
// SUBSECTION STATISTICS
CONFIG_SUBSECTION("Statistics");
// SUBSECTION OSCILLOSCOPE
CONFIG_SUBSECTION("Oscilloscope");
// SUBSECTION WINDOWS
CONFIG_SUBSECTION("Windows");
// SUBSECTION COLOR
CONFIG_SUBSECTION("Color");
END_SECTION;
}
// OLD SETTINGS HERE
if (ImGui::BeginTabItem("General (OLD)")) {
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
ImGui::Text("Workspace layout:");
ImGui::SameLine();
if (ImGui::Button("Import")) {
openFileDialog(GUI_FILE_IMPORT_LAYOUT);
}
ImGui::SameLine();
if (ImGui::Button("Export")) {
openFileDialog(GUI_FILE_EXPORT_LAYOUT);
}
ImGui::SameLine();
if (ImGui::Button("Reset")) {
showWarning("Are you sure you want to reset the workspace layout?",GUI_WARN_RESET_LAYOUT);
}
ImGui::Separator();
ImGui::Separator(); ImGui::Separator();
@ -612,56 +888,13 @@ void FurnaceGUI::drawSettings() {
settings.insFocusesPattern=insFocusesPatternB; settings.insFocusesPattern=insFocusesPatternB;
} }
bool restartOnFlagChangeB=settings.restartOnFlagChange;
if (ImGui::Checkbox("Restart song when changing chip properties",&restartOnFlagChangeB)) {
settings.restartOnFlagChange=restartOnFlagChangeB;
}
bool sysFileDialogB=settings.sysFileDialog;
if (ImGui::Checkbox("Use system file picker",&sysFileDialogB)) {
settings.sysFileDialog=sysFileDialogB;
}
bool moveWindowTitleB=settings.moveWindowTitle; bool moveWindowTitleB=settings.moveWindowTitle;
if (ImGui::Checkbox("Only allow window movement when clicking on title bar",&moveWindowTitleB)) { if (ImGui::Checkbox("Only allow window movement when clicking on title bar",&moveWindowTitleB)) {
settings.moveWindowTitle=moveWindowTitleB; settings.moveWindowTitle=moveWindowTitleB;
applyUISettings(false); applyUISettings(false);
} }
bool eventDelayB=settings.eventDelay;
if (ImGui::Checkbox("Enable event delay",&eventDelayB)) {
settings.eventDelay=eventDelayB;
applyUISettings(false);
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("may cause issues with high-polling-rate mice when previewing notes.");
}
bool powerSaveB=settings.powerSave;
if (ImGui::Checkbox("Power-saving mode",&powerSaveB)) {
settings.powerSave=powerSaveB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("saves power by lowering the frame rate to 2fps when idle.\nmay cause issues under Mesa drivers!");
}
bool renderClearPosB=settings.renderClearPos;
if (ImGui::Checkbox("Late render clear",&renderClearPosB)) {
settings.renderClearPos=renderClearPosB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("calls rend->clear() after rend->present(). might reduce UI latency by one frame in some drivers.");
}
#ifndef IS_MOBILE #ifndef IS_MOBILE
bool noThreadedInputB=settings.noThreadedInput;
if (ImGui::Checkbox("Disable threaded input (restart after changing!)",&noThreadedInputB)) {
settings.noThreadedInput=noThreadedInputB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("threaded input processes key presses for note preview on a separate thread (on supported platforms), which reduces latency.\nhowever, crashes have been reported when threaded input is on. enable this option if that is the case.");
}
bool saveWindowPosB=settings.saveWindowPos; bool saveWindowPosB=settings.saveWindowPos;
if (ImGui::Checkbox("Remember window position",&saveWindowPosB)) { if (ImGui::Checkbox("Remember window position",&saveWindowPosB)) {
settings.saveWindowPos=saveWindowPosB; settings.saveWindowPos=saveWindowPosB;
@ -671,40 +904,6 @@ void FurnaceGUI::drawSettings() {
} }
#endif #endif
bool blankInsB=settings.blankIns;
if (ImGui::Checkbox("New instruments are blank",&blankInsB)) {
settings.blankIns=blankInsB;
}
bool noDMFCompatB=settings.noDMFCompat;
if (ImGui::Checkbox("Don't apply compatibility flags when loading .dmf",&noDMFCompatB)) {
settings.noDMFCompat=noDMFCompatB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("do not report any issues arising from the use of this option!");
}
bool saveUnusedPatternsB=settings.saveUnusedPatterns;
if (ImGui::Checkbox("Save unused patterns",&saveUnusedPatternsB)) {
settings.saveUnusedPatterns=saveUnusedPatternsB;
}
bool compressB=settings.compress;
if (ImGui::Checkbox("Compress when saving",&compressB)) {
settings.compress=compressB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("use zlib to compress saved songs.");
}
bool newPatternFormatB=settings.newPatternFormat;
if (ImGui::Checkbox("Use new pattern format when saving",&newPatternFormatB)) {
settings.newPatternFormat=newPatternFormatB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("use a packed format which saves space when saving songs.\ndisable if you need compatibility with older Furnace and/or tools\nwhich do not support this format.");
}
bool cursorFollowsOrderB=settings.cursorFollowsOrder; bool cursorFollowsOrderB=settings.cursorFollowsOrder;
if (ImGui::Checkbox("Cursor follows current order when moving it",&cursorFollowsOrderB)) { if (ImGui::Checkbox("Cursor follows current order when moving it",&cursorFollowsOrderB)) {
settings.cursorFollowsOrder=cursorFollowsOrderB; settings.cursorFollowsOrder=cursorFollowsOrderB;
@ -713,24 +912,6 @@ void FurnaceGUI::drawSettings() {
ImGui::SetTooltip("applies when playback is stopped."); ImGui::SetTooltip("applies when playback is stopped.");
} }
ImGui::Text("Audio export loop/fade out time:");
if (ImGui::RadioButton("Set to these values on start-up:##fot0",settings.persistFadeOut==0)) {
settings.persistFadeOut=0;
}
ImGui::BeginDisabled(settings.persistFadeOut);
if (ImGui::InputInt("Loops",&settings.exportLoops,1,2)) {
if (exportLoops<0) exportLoops=0;
exportLoops=settings.exportLoops;
}
if (ImGui::InputDouble("Fade out (seconds)",&settings.exportFadeOut,1.0,2.0,"%.1f")) {
if (exportFadeOut<0.0) exportFadeOut=0.0;
exportFadeOut=settings.exportFadeOut;
}
ImGui::EndDisabled();
if (ImGui::RadioButton("Remember last values##fot1",settings.persistFadeOut==1)) {
settings.persistFadeOut=1;
}
ImGui::Text("Note preview behavior:"); ImGui::Text("Note preview behavior:");
if (ImGui::RadioButton("Never##npb0",settings.notePreviewBehavior==0)) { if (ImGui::RadioButton("Never##npb0",settings.notePreviewBehavior==0)) {
settings.notePreviewBehavior=0; settings.notePreviewBehavior=0;
@ -815,7 +996,7 @@ void FurnaceGUI::drawSettings() {
ImGui::EndChild(); ImGui::EndChild();
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Audio/MIDI")) { if (ImGui::BeginTabItem("Audio/MIDI (OLD)")) {
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
if (ImGui::BeginChild("SettingsView",settingsViewSize)) { if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
@ -1271,7 +1452,7 @@ void FurnaceGUI::drawSettings() {
ImGui::EndChild(); ImGui::EndChild();
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Emulation")) { if (ImGui::BeginTabItem("Emulation (OLD)")) {
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
if (ImGui::BeginChild("SettingsView",settingsViewSize)) { if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
@ -1343,49 +1524,10 @@ void FurnaceGUI::drawSettings() {
ImGui::EndChild(); ImGui::EndChild();
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Appearance")) { if (ImGui::BeginTabItem("Appearance (OLD)")) {
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
if (ImGui::BeginChild("SettingsView",settingsViewSize)) { if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
String curRenderBackend=settings.renderBackend.empty()?GUI_BACKEND_DEFAULT_NAME:settings.renderBackend;
if (ImGui::BeginCombo("Render backend",curRenderBackend.c_str())) {
#ifdef HAVE_RENDER_SDL
if (ImGui::Selectable("SDL Renderer",curRenderBackend=="SDL")) {
settings.renderBackend="SDL";
}
#endif
#ifdef HAVE_RENDER_DX11
if (ImGui::Selectable("DirectX 11",curRenderBackend=="DirectX 11")) {
settings.renderBackend="DirectX 11";
}
#endif
#ifdef HAVE_RENDER_GL
if (ImGui::Selectable("OpenGL",curRenderBackend=="OpenGL")) {
settings.renderBackend="OpenGL";
}
#endif
ImGui::EndCombo();
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("you may need to restart Furnace for this setting to take effect.");
}
if (curRenderBackend=="SDL") {
if (ImGui::BeginCombo("Render driver",settings.renderDriver.empty()?"Automatic":settings.renderDriver.c_str())) {
if (ImGui::Selectable("Automatic",settings.renderDriver.empty())) {
settings.renderDriver="";
}
for (String& i: availRenderDrivers) {
if (ImGui::Selectable(i.c_str(),i==settings.renderDriver)) {
settings.renderDriver=i;
}
}
ImGui::EndCombo();
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("you may need to restart Furnace for this setting to take effect.");
}
}
bool dpiScaleAuto=(settings.dpiScale<0.5f); bool dpiScaleAuto=(settings.dpiScale<0.5f);
if (ImGui::Checkbox("Automatic UI scaling factor",&dpiScaleAuto)) { if (ImGui::Checkbox("Automatic UI scaling factor",&dpiScaleAuto)) {
if (dpiScaleAuto) { if (dpiScaleAuto) {
@ -1487,10 +1629,7 @@ void FurnaceGUI::drawSettings() {
ImGui::Separator(); ImGui::Separator();
if (ImGui::InputInt("Number of recent files",&settings.maxRecentFile)) {
if (settings.maxRecentFile<0) settings.maxRecentFile=0;
if (settings.maxRecentFile>30) settings.maxRecentFile=30;
}
ImGui::Separator(); ImGui::Separator();
@ -1827,14 +1966,6 @@ void FurnaceGUI::drawSettings() {
settings.ordersCursor=ordersCursorB; settings.ordersCursor=ordersCursorB;
} }
bool partyTimeB=settings.partyTime;
if (ImGui::Checkbox("About screen party time",&partyTimeB)) {
settings.partyTime=partyTimeB;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Warning: may cause epileptic seizures.");
}
ImGui::Separator(); ImGui::Separator();
bool waveLayoutB=settings.waveLayout; bool waveLayoutB=settings.waveLayout;
@ -1867,11 +1998,6 @@ void FurnaceGUI::drawSettings() {
settings.frameBorders=frameBordersB; settings.frameBorders=frameBordersB;
} }
bool disableFadeInB=settings.disableFadeIn;
if (ImGui::Checkbox("Disable fade-in during start-up",&disableFadeInB)) {
settings.disableFadeIn=disableFadeInB;
}
ImGui::Separator(); ImGui::Separator();
ImGui::Text("Oscilloscope settings:"); ImGui::Text("Oscilloscope settings:");
@ -2241,7 +2367,7 @@ void FurnaceGUI::drawSettings() {
ImGui::EndChild(); ImGui::EndChild();
ImGui::EndTabItem(); ImGui::EndTabItem();
} }
if (ImGui::BeginTabItem("Keyboard")) { if (ImGui::BeginTabItem("Keyboard (OLD)")) {
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
if (ImGui::BeginChild("SettingsView",settingsViewSize)) { if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
@ -2606,7 +2732,7 @@ void FurnaceGUI::drawSettings() {
// "Nice Amiga cover of the song!" - enables hidden systems (YMU759/SoundUnit/Dummy) // "Nice Amiga cover of the song!" - enables hidden systems (YMU759/SoundUnit/Dummy)
// "42 63" - enables all instrument types // "42 63" - enables all instrument types
// "????" - enables stuff // "????" - enables stuff
if (ImGui::BeginTabItem("Cheat Codes")) { if (ImGui::BeginTabItem("Cheat Codes (OLD)")) {
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail(); ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y; settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
if (ImGui::BeginChild("SettingsView",settingsViewSize)) { if (ImGui::BeginChild("SettingsView",settingsViewSize)) {