Merge branch 'tildearrow:master' into master
This commit is contained in:
commit
1d04bb360a
|
@ -142,6 +142,7 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
|||
}
|
||||
|
||||
// compatibility flags
|
||||
if (!getConfInt("noDMFCompat",0)) {
|
||||
ds.limitSlides=true;
|
||||
ds.linearPitch=1;
|
||||
ds.loopModality=0;
|
||||
|
@ -213,6 +214,7 @@ bool DivEngine::loadDMF(unsigned char* file, size_t len) {
|
|||
if (ds.system[0]==DIV_SYSTEM_GB) {
|
||||
ds.systemFlags[0].set("enoughAlready",true);
|
||||
}
|
||||
}
|
||||
|
||||
logI("reading module data...");
|
||||
if (ds.version>0x0c) {
|
||||
|
|
|
@ -1523,6 +1523,7 @@ class FurnaceGUI {
|
|||
int newSongBehavior;
|
||||
int memUsageUnit;
|
||||
int cursorFollowsWheel;
|
||||
int noDMFCompat;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -1677,6 +1678,7 @@ class FurnaceGUI {
|
|||
newSongBehavior(0),
|
||||
memUsageUnit(1),
|
||||
cursorFollowsWheel(0),
|
||||
noDMFCompat(0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -236,6 +236,27 @@ const char* specificControls[18]={
|
|||
} \
|
||||
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 ret;
|
||||
for (char& i: what) {
|
||||
|
@ -286,26 +307,146 @@ void FurnaceGUI::drawSettings() {
|
|||
showWarning("Do you want to save your settings?",GUI_WARN_CLOSE_SETTINGS);
|
||||
}
|
||||
if (ImGui::BeginTabBar("settingsTab")) {
|
||||
if (ImGui::BeginTabItem("General")) {
|
||||
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);
|
||||
// NEW SETTINGS HERE
|
||||
CONFIG_SECTION("General") {
|
||||
// SUBSECTION PROGRAM
|
||||
CONFIG_SUBSECTION("Program");
|
||||
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";
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button("Export")) {
|
||||
openFileDialog(GUI_FILE_EXPORT_LAYOUT);
|
||||
#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.");
|
||||
}
|
||||
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::SameLine();
|
||||
if (ImGui::Button("Current system")) {
|
||||
|
@ -493,8 +634,21 @@ void FurnaceGUI::drawSettings() {
|
|||
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:");
|
||||
if (ImGui::RadioButton("No##pis0",settings.alwaysPlayIntro==0)) {
|
||||
settings.alwaysPlayIntro=0;
|
||||
|
@ -509,13 +663,135 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.alwaysPlayIntro=3;
|
||||
}
|
||||
|
||||
ImGui::Text("When creating new song:");
|
||||
if (ImGui::RadioButton("Display system preset selector##NSB0",settings.newSongBehavior==0)) {
|
||||
settings.newSongBehavior=0;
|
||||
bool disableFadeInB=settings.disableFadeIn;
|
||||
if (ImGui::Checkbox("Disable fade-in during start-up",&disableFadeInB)) {
|
||||
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();
|
||||
|
||||
|
@ -612,56 +888,13 @@ void FurnaceGUI::drawSettings() {
|
|||
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;
|
||||
if (ImGui::Checkbox("Only allow window movement when clicking on title bar",&moveWindowTitleB)) {
|
||||
settings.moveWindowTitle=moveWindowTitleB;
|
||||
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
|
||||
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;
|
||||
if (ImGui::Checkbox("Remember window position",&saveWindowPosB)) {
|
||||
settings.saveWindowPos=saveWindowPosB;
|
||||
|
@ -671,32 +904,6 @@ void FurnaceGUI::drawSettings() {
|
|||
}
|
||||
#endif
|
||||
|
||||
bool blankInsB=settings.blankIns;
|
||||
if (ImGui::Checkbox("New instruments are blank",&blankInsB)) {
|
||||
settings.blankIns=blankInsB;
|
||||
}
|
||||
|
||||
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;
|
||||
if (ImGui::Checkbox("Cursor follows current order when moving it",&cursorFollowsOrderB)) {
|
||||
settings.cursorFollowsOrder=cursorFollowsOrderB;
|
||||
|
@ -705,24 +912,6 @@ void FurnaceGUI::drawSettings() {
|
|||
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:");
|
||||
if (ImGui::RadioButton("Never##npb0",settings.notePreviewBehavior==0)) {
|
||||
settings.notePreviewBehavior=0;
|
||||
|
@ -807,7 +996,7 @@ void FurnaceGUI::drawSettings() {
|
|||
ImGui::EndChild();
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
if (ImGui::BeginTabItem("Audio/MIDI")) {
|
||||
if (ImGui::BeginTabItem("Audio/MIDI (OLD)")) {
|
||||
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
|
||||
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
|
||||
if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
|
||||
|
@ -1263,7 +1452,7 @@ void FurnaceGUI::drawSettings() {
|
|||
ImGui::EndChild();
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
if (ImGui::BeginTabItem("Emulation")) {
|
||||
if (ImGui::BeginTabItem("Emulation (OLD)")) {
|
||||
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
|
||||
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
|
||||
if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
|
||||
|
@ -1335,49 +1524,10 @@ void FurnaceGUI::drawSettings() {
|
|||
ImGui::EndChild();
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
if (ImGui::BeginTabItem("Appearance")) {
|
||||
if (ImGui::BeginTabItem("Appearance (OLD)")) {
|
||||
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
|
||||
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
|
||||
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);
|
||||
if (ImGui::Checkbox("Automatic UI scaling factor",&dpiScaleAuto)) {
|
||||
if (dpiScaleAuto) {
|
||||
|
@ -1479,10 +1629,7 @@ void FurnaceGUI::drawSettings() {
|
|||
|
||||
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();
|
||||
|
||||
|
@ -1819,14 +1966,6 @@ void FurnaceGUI::drawSettings() {
|
|||
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();
|
||||
|
||||
bool waveLayoutB=settings.waveLayout;
|
||||
|
@ -1859,11 +1998,6 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.frameBorders=frameBordersB;
|
||||
}
|
||||
|
||||
bool disableFadeInB=settings.disableFadeIn;
|
||||
if (ImGui::Checkbox("Disable fade-in during start-up",&disableFadeInB)) {
|
||||
settings.disableFadeIn=disableFadeInB;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
ImGui::Text("Oscilloscope settings:");
|
||||
|
@ -2233,7 +2367,7 @@ void FurnaceGUI::drawSettings() {
|
|||
ImGui::EndChild();
|
||||
ImGui::EndTabItem();
|
||||
}
|
||||
if (ImGui::BeginTabItem("Keyboard")) {
|
||||
if (ImGui::BeginTabItem("Keyboard (OLD)")) {
|
||||
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
|
||||
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
|
||||
if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
|
||||
|
@ -2598,7 +2732,7 @@ void FurnaceGUI::drawSettings() {
|
|||
// "Nice Amiga cover of the song!" - enables hidden systems (YMU759/SoundUnit/Dummy)
|
||||
// "42 63" - enables all instrument types
|
||||
// "????" - enables stuff
|
||||
if (ImGui::BeginTabItem("Cheat Codes")) {
|
||||
if (ImGui::BeginTabItem("Cheat Codes (OLD)")) {
|
||||
ImVec2 settingsViewSize=ImGui::GetContentRegionAvail();
|
||||
settingsViewSize.y-=ImGui::GetFrameHeight()+ImGui::GetStyle().WindowPadding.y;
|
||||
if (ImGui::BeginChild("SettingsView",settingsViewSize)) {
|
||||
|
@ -2821,6 +2955,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.newSongBehavior=e->getConfInt("newSongBehavior",0);
|
||||
settings.memUsageUnit=e->getConfInt("memUsageUnit",1);
|
||||
settings.cursorFollowsWheel=e->getConfInt("cursorFollowsWheel",0);
|
||||
settings.noDMFCompat=e->getConfInt("noDMFCompat",0);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
@ -2950,6 +3085,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.newSongBehavior,0,1);
|
||||
clampSetting(settings.memUsageUnit,0,1);
|
||||
clampSetting(settings.cursorFollowsWheel,0,1);
|
||||
clampSetting(settings.noDMFCompat,0,1);
|
||||
|
||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
@ -3175,6 +3311,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("newSongBehavior",settings.newSongBehavior);
|
||||
e->setConf("memUsageUnit",settings.memUsageUnit);
|
||||
e->setConf("cursorFollowsWheel",settings.cursorFollowsWheel);
|
||||
e->setConf("noDMFCompat",settings.noDMFCompat);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
Loading…
Reference in New Issue