GUI: remove basic mode

This commit is contained in:
tildearrow 2024-02-11 18:36:38 -05:00
parent b9a6a83798
commit 2f72e75f0e
6 changed files with 334 additions and 402 deletions

View file

@ -2661,7 +2661,7 @@ void FurnaceGUI::editOptions(bool topMenu) {
if (ImGui::MenuItem("cut",BIND_FOR(GUI_ACTION_PAT_CUT))) doCopy(true,true,selStart,selEnd);
if (ImGui::MenuItem("copy",BIND_FOR(GUI_ACTION_PAT_COPY))) doCopy(false,true,selStart,selEnd);
if (ImGui::MenuItem("paste",BIND_FOR(GUI_ACTION_PAT_PASTE))) doPaste();
if (!basicMode) if (ImGui::BeginMenu("paste special...")) {
if (ImGui::BeginMenu("paste special...")) {
if (ImGui::MenuItem("paste mix",BIND_FOR(GUI_ACTION_PAT_PASTE_MIX))) doPaste(GUI_PASTE_MODE_MIX_FG);
if (ImGui::MenuItem("paste mix (background)",BIND_FOR(GUI_ACTION_PAT_PASTE_MIX_BG))) doPaste(GUI_PASTE_MODE_MIX_BG);
if (ImGui::BeginMenu("paste with ins (foreground)")) {
@ -2698,165 +2698,163 @@ void FurnaceGUI::editOptions(bool topMenu) {
}
ImGui::Separator();
if (!basicMode) {
if (ImGui::BeginMenu("operation mask...")) {
drawOpMask(opMaskDelete);
ImGui::SameLine();
ImGui::Text("delete");
drawOpMask(opMaskPullDelete);
ImGui::SameLine();
ImGui::Text("pull delete");
drawOpMask(opMaskInsert);
ImGui::SameLine();
ImGui::Text("insert");
drawOpMask(opMaskPaste);
ImGui::SameLine();
ImGui::Text("paste");
drawOpMask(opMaskTransposeNote);
ImGui::SameLine();
ImGui::Text("transpose (note)");
drawOpMask(opMaskTransposeValue);
ImGui::SameLine();
ImGui::Text("transpose (value)");
drawOpMask(opMaskInterpolate);
ImGui::SameLine();
ImGui::Text("interpolate");
drawOpMask(opMaskFade);
ImGui::SameLine();
ImGui::Text("fade");
drawOpMask(opMaskInvertVal);
ImGui::SameLine();
ImGui::Text("invert values");
drawOpMask(opMaskScale);
ImGui::SameLine();
ImGui::Text("scale");
drawOpMask(opMaskRandomize);
ImGui::SameLine();
ImGui::Text("randomize");
drawOpMask(opMaskFlip);
ImGui::SameLine();
ImGui::Text("flip");
drawOpMask(opMaskCollapseExpand);
ImGui::SameLine();
ImGui::Text("collapse/expand");
ImGui::EndMenu();
}
ImGui::Text("input latch");
ImGui::PushFont(patFont);
if (ImGui::BeginTable("inputLatchTable",5,ImGuiTableFlags_Borders|ImGuiTableFlags_SizingFixedFit|ImGuiTableFlags_NoHostExtendX)) {
static char id[64];
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_ACTIVE]);
ImGui::Text("C-4");
ImGui::PopStyleColor();
ImGui::TableNextColumn();
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_INS]);
if (latchIns==-2) {
strcpy(id,"&&##LatchIns");
} else if (latchIns==-1) {
strcpy(id,"..##LatchIns");
} else {
snprintf(id,63,"%.2X##LatchIns",latchIns&0xff);
}
if (ImGui::Selectable(id,latchTarget==1,ImGuiSelectableFlags_DontClosePopups)) {
latchTarget=1;
latchNibble=false;
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
latchIns=-2;
}
if (ImGui::IsItemHovered()) {
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_TEXT]);
ImGui::SetTooltip("&&: selected instrument\n..: no instrument");
ImGui::PopStyleColor();
}
ImGui::PopStyleColor();
ImGui::TableNextColumn();
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_VOLUME_MAX]);
if (latchVol==-1) {
strcpy(id,"..##LatchVol");
} else {
snprintf(id,63,"%.2X##LatchVol",latchVol&0xff);
}
if (ImGui::Selectable(id,latchTarget==2,ImGuiSelectableFlags_DontClosePopups)) {
latchTarget=2;
latchNibble=false;
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
latchVol=-1;
}
ImGui::PopStyleColor();
ImGui::TableNextColumn();
if (latchEffect==-1) {
strcpy(id,"..##LatchFX");
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_INACTIVE]);
} else {
const unsigned char data=latchEffect;
snprintf(id,63,"%.2X##LatchFX",data);
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[fxColors[data]]);
}
if (ImGui::Selectable(id,latchTarget==3,ImGuiSelectableFlags_DontClosePopups)) {
latchTarget=3;
latchNibble=false;
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
latchEffect=-1;
}
ImGui::TableNextColumn();
if (latchEffectVal==-1) {
strcpy(id,"..##LatchFXV");
} else {
snprintf(id,63,"%.2X##LatchFXV",latchEffectVal&0xff);
}
if (ImGui::Selectable(id,latchTarget==4,ImGuiSelectableFlags_DontClosePopups)) {
latchTarget=4;
latchNibble=false;
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
latchEffectVal=-1;
}
ImGui::PopStyleColor();
ImGui::EndTable();
}
ImGui::PopFont();
if (ImGui::BeginMenu("operation mask...")) {
drawOpMask(opMaskDelete);
ImGui::SameLine();
if (ImGui::Button("Set")) {
DivPattern* pat=e->curPat[cursor.xCoarse].getPattern(e->curOrders->ord[cursor.xCoarse][curOrder],true);
latchIns=pat->data[cursor.y][2];
latchVol=pat->data[cursor.y][3];
latchEffect=pat->data[cursor.y][4];
latchEffectVal=pat->data[cursor.y][5];
latchTarget=0;
latchNibble=false;
}
ImGui::Text("delete");
drawOpMask(opMaskPullDelete);
ImGui::SameLine();
if (ImGui::Button("Reset")) {
latchIns=-2;
latchVol=-1;
latchEffect=-1;
latchEffectVal=-1;
latchTarget=0;
latchNibble=false;
}
ImGui::Separator();
ImGui::Text("pull delete");
drawOpMask(opMaskInsert);
ImGui::SameLine();
ImGui::Text("insert");
drawOpMask(opMaskPaste);
ImGui::SameLine();
ImGui::Text("paste");
drawOpMask(opMaskTransposeNote);
ImGui::SameLine();
ImGui::Text("transpose (note)");
drawOpMask(opMaskTransposeValue);
ImGui::SameLine();
ImGui::Text("transpose (value)");
drawOpMask(opMaskInterpolate);
ImGui::SameLine();
ImGui::Text("interpolate");
drawOpMask(opMaskFade);
ImGui::SameLine();
ImGui::Text("fade");
drawOpMask(opMaskInvertVal);
ImGui::SameLine();
ImGui::Text("invert values");
drawOpMask(opMaskScale);
ImGui::SameLine();
ImGui::Text("scale");
drawOpMask(opMaskRandomize);
ImGui::SameLine();
ImGui::Text("randomize");
drawOpMask(opMaskFlip);
ImGui::SameLine();
ImGui::Text("flip");
drawOpMask(opMaskCollapseExpand);
ImGui::SameLine();
ImGui::Text("collapse/expand");
ImGui::EndMenu();
}
ImGui::Text("input latch");
ImGui::PushFont(patFont);
if (ImGui::BeginTable("inputLatchTable",5,ImGuiTableFlags_Borders|ImGuiTableFlags_SizingFixedFit|ImGuiTableFlags_NoHostExtendX)) {
static char id[64];
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_ACTIVE]);
ImGui::Text("C-4");
ImGui::PopStyleColor();
ImGui::TableNextColumn();
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_INS]);
if (latchIns==-2) {
strcpy(id,"&&##LatchIns");
} else if (latchIns==-1) {
strcpy(id,"..##LatchIns");
} else {
snprintf(id,63,"%.2X##LatchIns",latchIns&0xff);
}
if (ImGui::Selectable(id,latchTarget==1,ImGuiSelectableFlags_DontClosePopups)) {
latchTarget=1;
latchNibble=false;
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
latchIns=-2;
}
if (ImGui::IsItemHovered()) {
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_TEXT]);
ImGui::SetTooltip("&&: selected instrument\n..: no instrument");
ImGui::PopStyleColor();
}
ImGui::PopStyleColor();
ImGui::TableNextColumn();
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_VOLUME_MAX]);
if (latchVol==-1) {
strcpy(id,"..##LatchVol");
} else {
snprintf(id,63,"%.2X##LatchVol",latchVol&0xff);
}
if (ImGui::Selectable(id,latchTarget==2,ImGuiSelectableFlags_DontClosePopups)) {
latchTarget=2;
latchNibble=false;
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
latchVol=-1;
}
ImGui::PopStyleColor();
ImGui::TableNextColumn();
if (latchEffect==-1) {
strcpy(id,"..##LatchFX");
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_INACTIVE]);
} else {
const unsigned char data=latchEffect;
snprintf(id,63,"%.2X##LatchFX",data);
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[fxColors[data]]);
}
if (ImGui::Selectable(id,latchTarget==3,ImGuiSelectableFlags_DontClosePopups)) {
latchTarget=3;
latchNibble=false;
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
latchEffect=-1;
}
ImGui::TableNextColumn();
if (latchEffectVal==-1) {
strcpy(id,"..##LatchFXV");
} else {
snprintf(id,63,"%.2X##LatchFXV",latchEffectVal&0xff);
}
if (ImGui::Selectable(id,latchTarget==4,ImGuiSelectableFlags_DontClosePopups)) {
latchTarget=4;
latchNibble=false;
}
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
latchEffectVal=-1;
}
ImGui::PopStyleColor();
ImGui::EndTable();
}
ImGui::PopFont();
ImGui::SameLine();
if (ImGui::Button("Set")) {
DivPattern* pat=e->curPat[cursor.xCoarse].getPattern(e->curOrders->ord[cursor.xCoarse][curOrder],true);
latchIns=pat->data[cursor.y][2];
latchVol=pat->data[cursor.y][3];
latchEffect=pat->data[cursor.y][4];
latchEffectVal=pat->data[cursor.y][5];
latchTarget=0;
latchNibble=false;
}
ImGui::SameLine();
if (ImGui::Button("Reset")) {
latchIns=-2;
latchVol=-1;
latchEffect=-1;
latchEffectVal=-1;
latchTarget=0;
latchNibble=false;
}
ImGui::Separator();
if (ImGui::MenuItem("note up",BIND_FOR(GUI_ACTION_PAT_NOTE_UP))) doTranspose(1,opMaskTransposeNote);
if (ImGui::MenuItem("note down",BIND_FOR(GUI_ACTION_PAT_NOTE_DOWN))) doTranspose(-1,opMaskTransposeNote);
if (ImGui::MenuItem("octave up",BIND_FOR(GUI_ACTION_PAT_OCTAVE_UP))) doTranspose(12,opMaskTransposeNote);
@ -2901,104 +2899,102 @@ void FurnaceGUI::editOptions(bool topMenu) {
ImGui::EndMenu();
}
if (!basicMode) {
if (ImGui::BeginMenu("gradient/fade...")) {
if (ImGui::InputInt("Start",&fadeMin,1,16)) {
if (fadeMin<0) fadeMin=0;
if (fadeMode) {
if (fadeMin>15) fadeMin=15;
} else {
if (fadeMin>255) fadeMin=255;
}
if (ImGui::BeginMenu("gradient/fade...")) {
if (ImGui::InputInt("Start",&fadeMin,1,16)) {
if (fadeMin<0) fadeMin=0;
if (fadeMode) {
if (fadeMin>15) fadeMin=15;
} else {
if (fadeMin>255) fadeMin=255;
}
if (ImGui::InputInt("End",&fadeMax,1,16)) {
if (fadeMax<0) fadeMax=0;
if (fadeMode) {
if (fadeMax>15) fadeMax=15;
} else {
if (fadeMax>255) fadeMax=255;
}
}
if (ImGui::Checkbox("Nibble mode",&fadeMode)) {
if (fadeMode) {
if (fadeMin>15) fadeMin=15;
if (fadeMax>15) fadeMax=15;
} else {
if (fadeMin>255) fadeMin=255;
if (fadeMax>255) fadeMax=255;
}
}
if (ImGui::Button("Go ahead")) {
doFade(fadeMin,fadeMax,fadeMode);
ImGui::CloseCurrentPopup();
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("scale...")) {
if (ImGui::InputFloat("##ScaleMax",&scaleMax,1,10,"%.1f%%")) {
if (scaleMax<0.0f) scaleMax=0.0f;
if (scaleMax>25600.0f) scaleMax=25600.0f;
if (ImGui::InputInt("End",&fadeMax,1,16)) {
if (fadeMax<0) fadeMax=0;
if (fadeMode) {
if (fadeMax>15) fadeMax=15;
} else {
if (fadeMax>255) fadeMax=255;
}
if (ImGui::Button("Scale")) {
doScale(scaleMax);
ImGui::CloseCurrentPopup();
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("randomize...")) {
if (ImGui::InputInt("Minimum",&randomizeMin,1,16)) {
if (randomizeMin<0) randomizeMin=0;
if (randomMode) {
if (randomizeMin>15) randomizeMin=15;
} else {
if (randomizeMin>255) randomizeMin=255;
}
if (randomizeMin>randomizeMax) randomizeMin=randomizeMax;
if (ImGui::Checkbox("Nibble mode",&fadeMode)) {
if (fadeMode) {
if (fadeMin>15) fadeMin=15;
if (fadeMax>15) fadeMax=15;
} else {
if (fadeMin>255) fadeMin=255;
if (fadeMax>255) fadeMax=255;
}
if (ImGui::InputInt("Maximum",&randomizeMax,1,16)) {
if (randomizeMax<0) randomizeMax=0;
if (randomizeMax<randomizeMin) randomizeMax=randomizeMin;
if (randomMode) {
if (randomizeMax>15) randomizeMax=15;
} else {
if (randomizeMax>255) randomizeMax=255;
}
}
if (ImGui::Checkbox("Nibble mode",&randomMode)) {
if (randomMode) {
if (randomizeMin>15) randomizeMin=15;
if (randomizeMax>15) randomizeMax=15;
} else {
if (randomizeMin>255) randomizeMin=255;
if (randomizeMax>255) randomizeMax=255;
}
}
// TODO: add an option to set effect to specific value?
if (ImGui::Button("Randomize")) {
doRandomize(randomizeMin,randomizeMax,randomMode);
ImGui::CloseCurrentPopup();
}
ImGui::EndMenu();
}
if (ImGui::MenuItem("invert values",BIND_FOR(GUI_ACTION_PAT_INVERT_VALUES))) doInvertValues();
if (ImGui::Button("Go ahead")) {
doFade(fadeMin,fadeMax,fadeMode);
ImGui::CloseCurrentPopup();
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("scale...")) {
if (ImGui::InputFloat("##ScaleMax",&scaleMax,1,10,"%.1f%%")) {
if (scaleMax<0.0f) scaleMax=0.0f;
if (scaleMax>25600.0f) scaleMax=25600.0f;
}
if (ImGui::Button("Scale")) {
doScale(scaleMax);
ImGui::CloseCurrentPopup();
}
ImGui::EndMenu();
}
if (ImGui::BeginMenu("randomize...")) {
if (ImGui::InputInt("Minimum",&randomizeMin,1,16)) {
if (randomizeMin<0) randomizeMin=0;
if (randomMode) {
if (randomizeMin>15) randomizeMin=15;
} else {
if (randomizeMin>255) randomizeMin=255;
}
if (randomizeMin>randomizeMax) randomizeMin=randomizeMax;
}
if (ImGui::InputInt("Maximum",&randomizeMax,1,16)) {
if (randomizeMax<0) randomizeMax=0;
if (randomizeMax<randomizeMin) randomizeMax=randomizeMin;
if (randomMode) {
if (randomizeMax>15) randomizeMax=15;
} else {
if (randomizeMax>255) randomizeMax=255;
}
}
if (ImGui::Checkbox("Nibble mode",&randomMode)) {
if (randomMode) {
if (randomizeMin>15) randomizeMin=15;
if (randomizeMax>15) randomizeMax=15;
} else {
if (randomizeMin>255) randomizeMin=255;
if (randomizeMax>255) randomizeMax=255;
}
}
// TODO: add an option to set effect to specific value?
if (ImGui::Button("Randomize")) {
doRandomize(randomizeMin,randomizeMax,randomMode);
ImGui::CloseCurrentPopup();
}
ImGui::EndMenu();
}
if (ImGui::MenuItem("invert values",BIND_FOR(GUI_ACTION_PAT_INVERT_VALUES))) doInvertValues();
ImGui::Separator();
if (ImGui::MenuItem("flip selection",BIND_FOR(GUI_ACTION_PAT_FLIP_SELECTION))) doFlip();
ImGui::SetNextItemWidth(120.0f*dpiScale);
if (ImGui::InputInt("collapse/expand amount##CollapseAmount",&collapseAmount,1,4)) {
if (collapseAmount<2) collapseAmount=2;
if (collapseAmount>256) collapseAmount=256;
}
if (ImGui::MenuItem("collapse",BIND_FOR(GUI_ACTION_PAT_COLLAPSE_ROWS))) doCollapse(collapseAmount,selStart,selEnd);
if (ImGui::MenuItem("expand",BIND_FOR(GUI_ACTION_PAT_EXPAND_ROWS))) doExpand(collapseAmount,selStart,selEnd);
if (topMenu) {
ImGui::Separator();
if (ImGui::MenuItem("flip selection",BIND_FOR(GUI_ACTION_PAT_FLIP_SELECTION))) doFlip();
ImGui::SetNextItemWidth(120.0f*dpiScale);
if (ImGui::InputInt("collapse/expand amount##CollapseAmount",&collapseAmount,1,4)) {
if (collapseAmount<2) collapseAmount=2;
if (collapseAmount>256) collapseAmount=256;
}
if (ImGui::MenuItem("collapse",BIND_FOR(GUI_ACTION_PAT_COLLAPSE_ROWS))) doCollapse(collapseAmount,selStart,selEnd);
if (ImGui::MenuItem("expand",BIND_FOR(GUI_ACTION_PAT_EXPAND_ROWS))) doExpand(collapseAmount,selStart,selEnd);
if (topMenu) {
ImGui::Separator();
if (ImGui::MenuItem("collapse pattern",BIND_FOR(GUI_ACTION_PAT_COLLAPSE_PAT))) doAction(GUI_ACTION_PAT_COLLAPSE_PAT);
if (ImGui::MenuItem("expand pattern",BIND_FOR(GUI_ACTION_PAT_EXPAND_PAT))) doAction(GUI_ACTION_PAT_EXPAND_PAT);
}
if (ImGui::MenuItem("collapse pattern",BIND_FOR(GUI_ACTION_PAT_COLLAPSE_PAT))) doAction(GUI_ACTION_PAT_COLLAPSE_PAT);
if (ImGui::MenuItem("expand pattern",BIND_FOR(GUI_ACTION_PAT_EXPAND_PAT))) doAction(GUI_ACTION_PAT_EXPAND_PAT);
}
if (topMenu) {
@ -3007,15 +3003,13 @@ void FurnaceGUI::editOptions(bool topMenu) {
if (ImGui::MenuItem("expand song",BIND_FOR(GUI_ACTION_PAT_EXPAND_SONG))) doAction(GUI_ACTION_PAT_EXPAND_SONG);
}
if (!basicMode) {
if (topMenu) {
ImGui::Separator();
if (ImGui::MenuItem("find/replace",BIND_FOR(GUI_ACTION_WINDOW_FIND),findOpen)) {
if (findOpen) {
findOpen=false;
} else {
nextWindow=GUI_WINDOW_FIND;
}
if (topMenu) {
ImGui::Separator();
if (ImGui::MenuItem("find/replace",BIND_FOR(GUI_ACTION_WINDOW_FIND),findOpen)) {
if (findOpen) {
findOpen=false;
} else {
nextWindow=GUI_WINDOW_FIND;
}
}
}
@ -4363,13 +4357,6 @@ bool FurnaceGUI::loop() {
if (ImGui::MenuItem("lock layout",NULL,lockLayout)) {
lockLayout=!lockLayout;
}
if (ImGui::MenuItem("basic mode",NULL,basicMode)) {
if (basicMode) {
showWarning("prepare to unlock the full power of Furnace!",GUI_WARN_BASIC_MODE);
} else {
showWarning("are you sure? this will disable several things.",GUI_WARN_BASIC_MODE);
}
}
if (ImGui::MenuItem("visualizer",NULL,fancyPattern)) {
fancyPattern=!fancyPattern;
e->enableCommandStream(fancyPattern);
@ -4404,15 +4391,11 @@ bool FurnaceGUI::loop() {
if (ImGui::MenuItem("orders",BIND_FOR(GUI_ACTION_WINDOW_ORDERS),ordersOpen)) ordersOpen=!ordersOpen;
if (ImGui::MenuItem("pattern",BIND_FOR(GUI_ACTION_WINDOW_PATTERN),patternOpen)) patternOpen=!patternOpen;
if (ImGui::MenuItem("mixer",BIND_FOR(GUI_ACTION_WINDOW_MIXER),mixerOpen)) mixerOpen=!mixerOpen;
if (!basicMode) {
if (ImGui::MenuItem("grooves",BIND_FOR(GUI_ACTION_WINDOW_GROOVES),groovesOpen)) groovesOpen=!groovesOpen;
if (ImGui::MenuItem("channels",BIND_FOR(GUI_ACTION_WINDOW_CHANNELS),channelsOpen)) channelsOpen=!channelsOpen;
}
if (ImGui::MenuItem("grooves",BIND_FOR(GUI_ACTION_WINDOW_GROOVES),groovesOpen)) groovesOpen=!groovesOpen;
if (ImGui::MenuItem("channels",BIND_FOR(GUI_ACTION_WINDOW_CHANNELS),channelsOpen)) channelsOpen=!channelsOpen;
if (ImGui::MenuItem("pattern manager",BIND_FOR(GUI_ACTION_WINDOW_PAT_MANAGER),patManagerOpen)) patManagerOpen=!patManagerOpen;
if (ImGui::MenuItem("chip manager",BIND_FOR(GUI_ACTION_WINDOW_SYS_MANAGER),sysManagerOpen)) sysManagerOpen=!sysManagerOpen;
if (!basicMode) {
if (ImGui::MenuItem("compatibility flags",BIND_FOR(GUI_ACTION_WINDOW_COMPAT_FLAGS),compatFlagsOpen)) compatFlagsOpen=!compatFlagsOpen;
}
if (ImGui::MenuItem("compatibility flags",BIND_FOR(GUI_ACTION_WINDOW_COMPAT_FLAGS),compatFlagsOpen)) compatFlagsOpen=!compatFlagsOpen;
if (ImGui::MenuItem("song comments",BIND_FOR(GUI_ACTION_WINDOW_NOTES),notesOpen)) notesOpen=!notesOpen;
ImGui::Separator();
if (ImGui::MenuItem("instrument editor",BIND_FOR(GUI_ACTION_WINDOW_INS_EDIT),insEditOpen)) insEditOpen=!insEditOpen;
@ -4658,9 +4641,7 @@ bool FurnaceGUI::loop() {
MEASURE(pattern,drawPattern());
MEASURE(editControls,drawEditControls());
MEASURE(speed,drawSpeed());
if (!basicMode) {
MEASURE(grooves,drawGrooves());
}
MEASURE(grooves,drawGrooves());
MEASURE(songInfo,drawSongInfo());
MEASURE(orders,drawOrders());
MEASURE(sampleList,drawSampleList());
@ -4680,14 +4661,10 @@ bool FurnaceGUI::loop() {
MEASURE(settings,drawSettings());
MEASURE(debug,drawDebug());
MEASURE(stats,drawStats());
if (!basicMode) {
MEASURE(compatFlags,drawCompatFlags());
}
MEASURE(compatFlags,drawCompatFlags());
MEASURE(piano,drawPiano());
MEASURE(notes,drawNotes());
if (!basicMode) {
MEASURE(channels,drawChannels());
}
MEASURE(channels,drawChannels());
MEASURE(patManager,drawPatManager());
MEASURE(sysManager,drawSysManager());
MEASURE(clock,drawClock());
@ -5896,16 +5873,6 @@ bool FurnaceGUI::loop() {
ImGui::CloseCurrentPopup();
}
break;
case GUI_WARN_BASIC_MODE:
if (ImGui::Button("Yes")) {
basicMode=!basicMode;
ImGui::CloseCurrentPopup();
}
ImGui::SameLine();
if (ImGui::Button("No")) {
ImGui::CloseCurrentPopup();
}
break;
case GUI_WARN_GENERIC:
if (ImGui::Button("OK")) {
ImGui::CloseCurrentPopup();
@ -6583,12 +6550,6 @@ bool FurnaceGUI::init() {
findOpen=e->getConfBool("findOpen",false);
spoilerOpen=e->getConfBool("spoilerOpen",false);
if (e->hasConf("lastDir")) {
basicMode=e->getConfBool("basicMode",false);
} else {
basicMode=true;
}
insListDir=e->getConfBool("insListDir",false);
waveListDir=e->getConfBool("waveListDir",false);
sampleListDir=e->getConfBool("sampleListDir",false);
@ -7142,7 +7103,6 @@ void FurnaceGUI::commitState() {
e->setConf("subSongsOpen",subSongsOpen);
e->setConf("findOpen",findOpen);
e->setConf("spoilerOpen",spoilerOpen);
e->setConf("basicMode",basicMode);
// commit dir state
e->setConf("insListDir",insListDir);
@ -7485,7 +7445,6 @@ FurnaceGUI::FurnaceGUI():
speedOpen(true),
groovesOpen(false),
xyOscOpen(false),
basicMode(true),
shortIntro(false),
insListDir(false),
waveListDir(false),

View file

@ -551,7 +551,6 @@ enum FurnaceGUIWarnings {
GUI_WARN_SUBSONG_DEL,
GUI_WARN_SYSTEM_DEL,
GUI_WARN_CLEAR_HISTORY,
GUI_WARN_BASIC_MODE,
GUI_WARN_GENERIC
};
@ -2035,7 +2034,7 @@ class FurnaceGUI {
bool subSongsOpen, findOpen, spoilerOpen, patManagerOpen, sysManagerOpen, clockOpen, speedOpen;
bool groovesOpen, xyOscOpen;
bool basicMode, shortIntro;
bool shortIntro;
bool insListDir, waveListDir, sampleListDir;
bool clockShowReal, clockShowRow, clockShowBeat, clockShowMetro, clockShowTime;

View file

@ -296,7 +296,7 @@ void FurnaceGUI::drawMixer() {
}
ImGui::EndTabItem();
}
if (!basicMode) if (ImGui::BeginTabItem("Patchbay")) {
if (ImGui::BeginTabItem("Patchbay")) {
std::map<unsigned int,ImVec2> portPos;
if (ImGui::BeginTable("PatchbayOptions",3)) {

View file

@ -63,40 +63,34 @@ void FurnaceGUI::drawSongInfo(bool asChild) {
if (ImGui::InputText("##Category",&e->song.category,ImGuiInputTextFlags_UndoRedo)) {
MARK_MODIFIED;
}
if (!basicMode) {
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::Text("System");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(MAX(16.0f*dpiScale,avail-autoButtonSize-ImGui::GetStyle().ItemSpacing.x));
if (ImGui::InputText("##SystemName",&e->song.systemName,ImGuiInputTextFlags_UndoRedo)) {
MARK_MODIFIED;
updateWindowTitle();
e->song.autoSystem=false;
}
ImGui::SameLine();
pushToggleColors(e->song.autoSystem);
if (ImGui::Button("Auto")) {
e->song.autoSystem=!e->song.autoSystem;
if (e->song.autoSystem) {
autoDetectSystem();
updateWindowTitle();
}
MARK_MODIFIED;
}
popToggleColors();
autoButtonSize=ImGui::GetItemRectSize().x;
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::Text("System");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(MAX(16.0f*dpiScale,avail-autoButtonSize-ImGui::GetStyle().ItemSpacing.x));
if (ImGui::InputText("##SystemName",&e->song.systemName,ImGuiInputTextFlags_UndoRedo)) {
MARK_MODIFIED;
updateWindowTitle();
e->song.autoSystem=false;
}
ImGui::SameLine();
pushToggleColors(e->song.autoSystem);
if (ImGui::Button("Auto")) {
e->song.autoSystem=!e->song.autoSystem;
if (e->song.autoSystem) {
autoDetectSystem();
updateWindowTitle();
}
MARK_MODIFIED;
}
popToggleColors();
autoButtonSize=ImGui::GetItemRectSize().x;
ImGui::EndTable();
}
if (basicMode) {
if (e->song.tuning<435.8 || e->song.tuning>444) {
ImGui::TextWrapped("Tuning changed - disable Basic Mode to edit.");
}
} else if (ImGui::BeginTable("OtherProps",2,ImGuiTableFlags_SizingStretchProp)) {
if (ImGui::BeginTable("OtherProps",2,ImGuiTableFlags_SizingStretchProp)) {
ImGui::TableSetupColumn("c0",ImGuiTableColumnFlags_WidthFixed,0.0);
ImGui::TableSetupColumn("c1",ImGuiTableColumnFlags_WidthStretch,0.0);

View file

@ -162,45 +162,43 @@ void FurnaceGUI::drawSpeed(bool asChild) {
}
}
if (!basicMode) {
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::Text("Virtual Tempo");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(halfAvail);
if (ImGui::InputScalar("##VTempoN",ImGuiDataType_S16,&e->curSubSong->virtualTempoN,&_ONE,&_TEN)) { MARK_MODIFIED
if (e->curSubSong->virtualTempoN<1) e->curSubSong->virtualTempoN=1;
if (e->curSubSong->virtualTempoN>255) e->curSubSong->virtualTempoN=255;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Numerator");
}
ImGui::SameLine();
ImGui::SetNextItemWidth(halfAvail);
if (ImGui::InputScalar("##VTempoD",ImGuiDataType_S16,&e->curSubSong->virtualTempoD,&_ONE,&_TEN)) { MARK_MODIFIED
if (e->curSubSong->virtualTempoD<1) e->curSubSong->virtualTempoD=1;
if (e->curSubSong->virtualTempoD>255) e->curSubSong->virtualTempoD=255;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Denominator (set to base tempo)");
}
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::Text("Divider");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(halfAvail);
unsigned char realTB=e->curSubSong->timeBase+1;
if (ImGui::InputScalar("##TimeBase",ImGuiDataType_U8,&realTB,&_ONE,&_THREE)) { MARK_MODIFIED
if (realTB<1) realTB=1;
if (realTB>16) realTB=16;
e->curSubSong->timeBase=realTB-1;
}
ImGui::SameLine();
ImGui::Text("%.2f BPM",calcBPM(e->curSubSong->speeds,e->curSubSong->hz,e->curSubSong->virtualTempoN,e->curSubSong->virtualTempoD));
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::Text("Virtual Tempo");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(halfAvail);
if (ImGui::InputScalar("##VTempoN",ImGuiDataType_S16,&e->curSubSong->virtualTempoN,&_ONE,&_TEN)) { MARK_MODIFIED
if (e->curSubSong->virtualTempoN<1) e->curSubSong->virtualTempoN=1;
if (e->curSubSong->virtualTempoN>255) e->curSubSong->virtualTempoN=255;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Numerator");
}
ImGui::SameLine();
ImGui::SetNextItemWidth(halfAvail);
if (ImGui::InputScalar("##VTempoD",ImGuiDataType_S16,&e->curSubSong->virtualTempoD,&_ONE,&_TEN)) { MARK_MODIFIED
if (e->curSubSong->virtualTempoD<1) e->curSubSong->virtualTempoD=1;
if (e->curSubSong->virtualTempoD>255) e->curSubSong->virtualTempoD=255;
}
if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Denominator (set to base tempo)");
}
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::Text("Divider");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(halfAvail);
unsigned char realTB=e->curSubSong->timeBase+1;
if (ImGui::InputScalar("##TimeBase",ImGuiDataType_U8,&realTB,&_ONE,&_THREE)) { MARK_MODIFIED
if (realTB<1) realTB=1;
if (realTB>16) realTB=16;
e->curSubSong->timeBase=realTB-1;
}
ImGui::SameLine();
ImGui::Text("%.2f BPM",calcBPM(e->curSubSong->speeds,e->curSubSong->hz,e->curSubSong->virtualTempoN,e->curSubSong->virtualTempoD));
ImGui::TableNextRow();
ImGui::TableNextColumn();
@ -239,21 +237,19 @@ void FurnaceGUI::drawSpeed(bool asChild) {
e->curSubSong->patLen=patLen;
}
if (!basicMode) {
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::Text("Song Length");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(avail);
int ordLen=e->curSubSong->ordersLen;
if (ImGui::InputInt("##OrdLength",&ordLen,1,4)) { MARK_MODIFIED
if (ordLen<1) ordLen=1;
if (ordLen>DIV_MAX_PATTERNS) ordLen=DIV_MAX_PATTERNS;
e->curSubSong->ordersLen=ordLen;
if (curOrder>=ordLen) {
setOrder(ordLen-1);
}
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::AlignTextToFramePadding();
ImGui::Text("Song Length");
ImGui::TableNextColumn();
ImGui::SetNextItemWidth(avail);
int ordLen=e->curSubSong->ordersLen;
if (ImGui::InputInt("##OrdLength",&ordLen,1,4)) { MARK_MODIFIED
if (ordLen<1) ordLen=1;
if (ordLen>DIV_MAX_PATTERNS) ordLen=DIV_MAX_PATTERNS;
e->curSubSong->ordersLen=ordLen;
if (curOrder>=ordLen) {
setOrder(ordLen-1);
}
}

View file

@ -279,29 +279,13 @@ void FurnaceGUI::drawTutorial() {
ImGui::Separator();
ImGui::TextWrapped(
"there are two interface modes: Basic, and Advanced.\n"
"the Basic Mode only shows essential features. use it if you are new to trackers or prefer simplicity.\n"
"Advanced Mode allows you to use all Furnace features, but it may be confusing."
);
ImGui::TextWrapped("pick a mode to begin your journey! (you can always switch by going to Settings > Basic Mode)");
if (ImGui::Button("Start in Basic Mode")) {
basicMode=true;
tutorial.protoWelcome=true;
commitTutorial();
ImGui::CloseCurrentPopup();
}
if (ImGui::Button("Start in Advanced Mode")) {
basicMode=false;
tutorial.protoWelcome=true;
commitTutorial();
ImGui::CloseCurrentPopup();
}
ImGui::TextWrapped("if you find any issues, be sure to report them! the issue tracker is here: https://github.com/tildearrow/furnace/issues");
if (ImGui::Button("OK")) {
tutorial.protoWelcome=true;
commitTutorial();
ImGui::CloseCurrentPopup();
}
ImGui::SetWindowPos(ImVec2(
(canvasW-ImGui::GetWindowSize().x)*0.5,