Merge branches 'master' and 'k053260' of https://github.com/tildearrow/furnace into k053260
This commit is contained in:
commit
7b49b4b8e0
161 changed files with 1190 additions and 864 deletions
|
|
@ -697,6 +697,7 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
pushDestColor();
|
||||
if (ImGui::Button(ICON_FA_TIMES "##InsDelete")) {
|
||||
if (settings.unifiedDataView) {
|
||||
switch (lastAssetType) {
|
||||
|
|
@ -714,6 +715,7 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
|||
doAction(GUI_ACTION_INS_LIST_DELETE);
|
||||
}
|
||||
}
|
||||
popDestColor();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Delete");
|
||||
}
|
||||
|
|
@ -934,9 +936,11 @@ void FurnaceGUI::drawWaveList(bool asChild) {
|
|||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
pushDestColor();
|
||||
if (ImGui::Button(ICON_FA_TIMES "##WaveDelete")) {
|
||||
doAction(GUI_ACTION_WAVE_LIST_DELETE);
|
||||
}
|
||||
popDestColor();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Delete");
|
||||
}
|
||||
|
|
@ -1074,13 +1078,6 @@ void FurnaceGUI::drawSampleList(bool asChild) {
|
|||
}
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_TIMES "##SampleDelete")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_DELETE);
|
||||
}
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Delete");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
if (ImGui::Button(ICON_FA_VOLUME_UP "##PreviewSampleL")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_PREVIEW);
|
||||
}
|
||||
|
|
@ -1094,6 +1091,15 @@ void FurnaceGUI::drawSampleList(bool asChild) {
|
|||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Stop preview");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
pushDestColor();
|
||||
if (ImGui::Button(ICON_FA_TIMES "##SampleDelete")) {
|
||||
doAction(GUI_ACTION_SAMPLE_LIST_DELETE);
|
||||
}
|
||||
popDestColor();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Delete");
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::BeginTable("SampleListScroll",1,ImGuiTableFlags_ScrollY)) {
|
||||
actualSampleList();
|
||||
|
|
|
|||
|
|
@ -5076,7 +5076,24 @@ bool FurnaceGUI::loop() {
|
|||
newSongQuery="";
|
||||
newSongFirstFrame=true;
|
||||
displayNew=false;
|
||||
ImGui::OpenPopup("New Song");
|
||||
if (settings.newSongBehavior==1) {
|
||||
e->createNewFromDefaults();
|
||||
undoHist.clear();
|
||||
redoHist.clear();
|
||||
curFileName="";
|
||||
modified=false;
|
||||
curNibble=false;
|
||||
orderNibble=false;
|
||||
orderCursor=-1;
|
||||
samplePos=0;
|
||||
updateSampleTex=true;
|
||||
selStart=SelectionPoint();
|
||||
selEnd=SelectionPoint();
|
||||
cursor=SelectionPoint();
|
||||
updateWindowTitle();
|
||||
} else {
|
||||
ImGui::OpenPopup("New Song");
|
||||
}
|
||||
}
|
||||
|
||||
if (displayEditString) {
|
||||
|
|
@ -6575,6 +6592,7 @@ FurnaceGUI::FurnaceGUI():
|
|||
portrait(false),
|
||||
injectBackUp(false),
|
||||
mobileMenuOpen(false),
|
||||
warnColorPushed(false),
|
||||
wantCaptureKeyboard(false),
|
||||
oldWantCaptureKeyboard(false),
|
||||
displayMacroMenu(false),
|
||||
|
|
|
|||
|
|
@ -126,6 +126,9 @@ enum FurnaceGUIColors {
|
|||
GUI_COLOR_TOGGLE_ON,
|
||||
GUI_COLOR_EDITING,
|
||||
GUI_COLOR_SONG_LOOP,
|
||||
GUI_COLOR_DESTRUCTIVE,
|
||||
GUI_COLOR_WARNING,
|
||||
GUI_COLOR_ERROR,
|
||||
|
||||
GUI_COLOR_FILE_DIR,
|
||||
GUI_COLOR_FILE_SONG_NATIVE,
|
||||
|
|
@ -1297,7 +1300,7 @@ class FurnaceGUI {
|
|||
|
||||
bool quit, warnQuit, willCommit, edit, modified, displayError, displayExporting, vgmExportLoop, zsmExportLoop, vgmExportPatternHints;
|
||||
bool vgmExportDirectStream, displayInsTypeList;
|
||||
bool portrait, injectBackUp, mobileMenuOpen;
|
||||
bool portrait, injectBackUp, mobileMenuOpen, warnColorPushed;
|
||||
bool wantCaptureKeyboard, oldWantCaptureKeyboard, displayMacroMenu;
|
||||
bool displayNew, fullScreen, preserveChanPos, wantScrollList, noteInputPoly;
|
||||
bool displayPendingIns, pendingInsSingle, displayPendingRawSample, snesFilterHex, modTableHex, displayEditString;
|
||||
|
|
@ -1506,6 +1509,7 @@ class FurnaceGUI {
|
|||
int renderClearPos;
|
||||
int insertBehavior;
|
||||
int pullDeleteRow;
|
||||
int newSongBehavior;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
|
@ -1657,6 +1661,7 @@ class FurnaceGUI {
|
|||
renderClearPos(0),
|
||||
insertBehavior(1),
|
||||
pullDeleteRow(1),
|
||||
newSongBehavior(0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
@ -2082,6 +2087,11 @@ class FurnaceGUI {
|
|||
void pushAccentColors(const ImVec4& one, const ImVec4& two, const ImVec4& border, const ImVec4& borderShadow);
|
||||
void popAccentColors();
|
||||
|
||||
void pushDestColor();
|
||||
void popDestColor();
|
||||
void pushWarningColor(bool warnCond, bool errorCond=false);
|
||||
void popWarningColor();
|
||||
|
||||
float calcBPM(const DivGroovePattern& speeds, float hz, int vN, int vD);
|
||||
|
||||
void patternRow(int i, bool isPlaying, float lineHeight, int chans, int ord, const DivPattern** patCache, bool inhibitSel);
|
||||
|
|
|
|||
|
|
@ -743,6 +743,9 @@ const FurnaceGUIColorDef guiColors[GUI_COLOR_MAX]={
|
|||
D(GUI_COLOR_TOGGLE_ON,"",ImVec4(0.2f,0.6f,0.2f,1.0f)),
|
||||
D(GUI_COLOR_EDITING,"",ImVec4(0.2f,0.1f,0.1f,1.0f)),
|
||||
D(GUI_COLOR_SONG_LOOP,"",ImVec4(0.3f,0.5f,0.8f,0.4f)),
|
||||
D(GUI_COLOR_DESTRUCTIVE,"",ImVec4(1.0f,0.2f,0.2f,1.0f)),
|
||||
D(GUI_COLOR_WARNING,"",ImVec4(0.98f,0.98f,0.06f,1.0f)),
|
||||
D(GUI_COLOR_ERROR,"",ImVec4(0.98f,0.06f,0.11f,1.0f)),
|
||||
|
||||
D(GUI_COLOR_FILE_DIR,"",ImVec4(0.0f,1.0f,1.0f,1.0f)),
|
||||
D(GUI_COLOR_FILE_SONG_NATIVE,"",ImVec4(0.5f,1.0f,0.5f,1.0f)),
|
||||
|
|
|
|||
|
|
@ -822,10 +822,15 @@ void FurnaceGUI::initSystemPresets() {
|
|||
}
|
||||
);
|
||||
ENTRY(
|
||||
"ZX Spectrum (48K)", {
|
||||
"ZX Spectrum (48K, SFX-like engine)", {
|
||||
CH(DIV_SYSTEM_SFX_BEEPER, 1.0f, 0, "")
|
||||
}
|
||||
);
|
||||
ENTRY(
|
||||
"ZX Spectrum (48K, QuadTone engine)", {
|
||||
CH(DIV_SYSTEM_SFX_BEEPER_QUADTONE, 1.0f, 0, "")
|
||||
}
|
||||
);
|
||||
ENTRY(
|
||||
"ZX Spectrum (128K)", {
|
||||
CH(DIV_SYSTEM_AY8910, 1.0f, 0, "clockSel=1") //beeper was also included
|
||||
|
|
@ -2635,10 +2640,15 @@ void FurnaceGUI::initSystemPresets() {
|
|||
}
|
||||
);
|
||||
ENTRY(
|
||||
"ZX Spectrum (beeper only)", {
|
||||
"ZX Spectrum (beeper only, SFX-like engine)", {
|
||||
CH(DIV_SYSTEM_SFX_BEEPER, 1.0f, 0, "")
|
||||
}
|
||||
);
|
||||
ENTRY(
|
||||
"ZX Spectrum (beeper only, QuadTone engine)", {
|
||||
CH(DIV_SYSTEM_SFX_BEEPER_QUADTONE, 1.0f, 0, "")
|
||||
}
|
||||
);
|
||||
ENTRY(
|
||||
"Sharp SM8521", {
|
||||
CH(DIV_SYSTEM_SM8521, 1.0f, 0, "")
|
||||
|
|
|
|||
|
|
@ -43,6 +43,12 @@ const double timeMultipliers[13]={
|
|||
#define CENTER_TEXT(text) \
|
||||
ImGui::SetCursorPosX(ImGui::GetCursorPosX()+0.5*(ImGui::GetContentRegionAvail().x-ImGui::CalcTextSize(text).x));
|
||||
|
||||
#define SAMPLE_WARN(_x,_text) \
|
||||
if (_x.find(_text)==String::npos) { \
|
||||
if (!_x.empty()) _x+='\n'; \
|
||||
_x+=_text; \
|
||||
}
|
||||
|
||||
void FurnaceGUI::drawSampleEdit() {
|
||||
if (nextWindow==GUI_WINDOW_SAMPLE_EDIT) {
|
||||
sampleEditOpen=true;
|
||||
|
|
@ -166,6 +172,9 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
|
||||
ImGui::Separator();
|
||||
|
||||
String warnLoop, warnLoopMode, warnLoopPos;
|
||||
String warnLength;
|
||||
|
||||
bool isChipVisible[DIV_MAX_CHIPS];
|
||||
bool isTypeVisible[DIV_MAX_SAMPLE_TYPE];
|
||||
bool isMemVisible[DIV_MAX_SAMPLE_TYPE][DIV_MAX_CHIPS];
|
||||
|
|
@ -174,7 +183,83 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
memset(isTypeVisible,0,DIV_MAX_SAMPLE_TYPE*sizeof(bool));
|
||||
memset(isMemVisible,0,DIV_MAX_CHIPS*DIV_MAX_SAMPLE_TYPE*sizeof(bool));
|
||||
memset(isMemWarning,0,DIV_MAX_CHIPS*DIV_MAX_SAMPLE_TYPE*sizeof(bool));
|
||||
|
||||
for (int i=0; i<e->song.systemLen; i++) {
|
||||
// warnings
|
||||
switch (e->song.system[i]) {
|
||||
case DIV_SYSTEM_SNES:
|
||||
if (sample->loop) {
|
||||
if (sample->loopStart&15 || sample->loopEnd&15) {
|
||||
SAMPLE_WARN(warnLoopPos,"SNES: loop must be a multiple of 16");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_QSOUND:
|
||||
if (sample->loop) {
|
||||
if (sample->loopEnd-sample->loopStart>32767) {
|
||||
SAMPLE_WARN(warnLoopPos,"QSound: loop cannot be longer than 32767 samples");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_NES:
|
||||
if (sample->loop) {
|
||||
if (sample->loopStart!=0 || sample->loopEnd!=(int)(sample->samples)) {
|
||||
SAMPLE_WARN(warnLoopPos,"NES: loop point ignored on DPCM (may only loop entire sample)");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_X1_010:
|
||||
if (sample->loop) {
|
||||
SAMPLE_WARN(warnLoop,"X1-010: samples can't loop");
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_GA20:
|
||||
if (sample->loop) {
|
||||
SAMPLE_WARN(warnLoop,"GA20: samples can't loop");
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_YM2608:
|
||||
case DIV_SYSTEM_YM2608_EXT:
|
||||
case DIV_SYSTEM_YM2608_CSM:
|
||||
if (sample->loop) {
|
||||
if (sample->loopStart!=0 || sample->loopEnd!=(int)(sample->samples)) {
|
||||
SAMPLE_WARN(warnLoopPos,"YM2608: loop point ignored on ADPCM-B (may only loop entire sample)");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_YM2610_FULL:
|
||||
case DIV_SYSTEM_YM2610_FULL_EXT:
|
||||
case DIV_SYSTEM_YM2610_CSM:
|
||||
case DIV_SYSTEM_YM2610B:
|
||||
case DIV_SYSTEM_YM2610B_EXT:
|
||||
if (sample->loop) {
|
||||
SAMPLE_WARN(warnLoop,"YM2610: ADPCM-A samples can't loop");
|
||||
if (sample->loopStart!=0 || sample->loopEnd!=(int)(sample->samples)) {
|
||||
SAMPLE_WARN(warnLoopPos,"YM2608: loop point ignored on ADPCM-B (may only loop entire sample)");
|
||||
}
|
||||
}
|
||||
break;
|
||||
case DIV_SYSTEM_AMIGA:
|
||||
if (sample->loop) {
|
||||
if (sample->loopStart&1 || sample->loopEnd&1) {
|
||||
SAMPLE_WARN(warnLoopPos,"Amiga: loop must be a multiple of 2");
|
||||
}
|
||||
}
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
if (e->song.system[i]!=DIV_SYSTEM_PCM_DAC) {
|
||||
if (e->song.system[i]==DIV_SYSTEM_ES5506) {
|
||||
if (sample->loopMode==DIV_SAMPLE_LOOP_BACKWARD) {
|
||||
SAMPLE_WARN(warnLoopMode,"ES5506: backward loop mode isn't supported");
|
||||
}
|
||||
} else if (sample->loopMode!=DIV_SAMPLE_LOOP_FORWARD) {
|
||||
SAMPLE_WARN(warnLoopMode,"backward/ping-pong only supported in Generic PCM DAC\nping-pong also on ES5506");
|
||||
}
|
||||
}
|
||||
|
||||
// chips grid
|
||||
DivDispatch* dispatch=e->getDispatch(i);
|
||||
if (dispatch==NULL) continue;
|
||||
|
||||
|
|
@ -186,6 +271,7 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
if (!dispatch->isSampleLoaded(j,curSample)) isMemWarning[j][i]=true;
|
||||
}
|
||||
}
|
||||
|
||||
int selColumns=1;
|
||||
for (int i=0; i<DIV_MAX_CHIPS; i++) {
|
||||
if (isChipVisible[i]) selColumns++;
|
||||
|
|
@ -218,6 +304,7 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
popToggleColors();
|
||||
ImGui::TableNextColumn();
|
||||
bool doLoop=(sample->loop);
|
||||
pushWarningColor(!warnLoop.empty());
|
||||
if (ImGui::Checkbox("Loop",&doLoop)) { MARK_MODIFIED
|
||||
if (doLoop) {
|
||||
sample->loop=true;
|
||||
|
|
@ -238,8 +325,12 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
e->renderSamplesP();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||
ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!");
|
||||
popWarningColor();
|
||||
if (ImGui::IsItemHovered() && (!warnLoop.empty() || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||
SAMPLE_WARN(warnLoop,"changing the loop in a BRR sample may result in glitches!");
|
||||
}
|
||||
ImGui::SetTooltip("%s",warnLoop.c_str());
|
||||
}
|
||||
|
||||
if (selColumns>1) {
|
||||
|
|
@ -417,6 +508,7 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
keepLoopAlive=false;
|
||||
ImGui::Text("Mode");
|
||||
ImGui::SameLine();
|
||||
pushWarningColor(!warnLoopMode.empty());
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
if (ImGui::BeginCombo("##SampleLoopMode",loopType.c_str())) {
|
||||
for (int i=0; i<DIV_SAMPLE_LOOP_MAX; i++) {
|
||||
|
|
@ -431,7 +523,12 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
}
|
||||
ImGui::EndCombo();
|
||||
}
|
||||
if (ImGui::IsItemHovered() && !warnLoopMode.empty()) {
|
||||
ImGui::SetTooltip("%s",warnLoopMode.c_str());
|
||||
}
|
||||
popWarningColor();
|
||||
|
||||
pushWarningColor(!warnLoopPos.empty());
|
||||
ImGui::Text("Start");
|
||||
ImGui::SameLine();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
|
|
@ -450,8 +547,11 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
if (ImGui::IsItemActive()) {
|
||||
keepLoopAlive=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||
ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!");
|
||||
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||
SAMPLE_WARN(warnLoopPos,"changing the loop in a BRR sample may result in glitches!");
|
||||
}
|
||||
ImGui::SetTooltip("%s",warnLoopPos.c_str());
|
||||
}
|
||||
|
||||
ImGui::Text("End");
|
||||
|
|
@ -472,9 +572,13 @@ void FurnaceGUI::drawSampleEdit() {
|
|||
if (ImGui::IsItemActive()) {
|
||||
keepLoopAlive=true;
|
||||
}
|
||||
if (ImGui::IsItemHovered() && sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||
ImGui::SetTooltip("changing the loop in a BRR sample may result in glitches!");
|
||||
if (ImGui::IsItemHovered() && (!warnLoopPos.empty() || sample->depth==DIV_SAMPLE_DEPTH_BRR)) {
|
||||
if (sample->depth==DIV_SAMPLE_DEPTH_BRR) {
|
||||
SAMPLE_WARN(warnLoopPos,"changing the loop in a BRR sample may result in glitches!");
|
||||
}
|
||||
ImGui::SetTooltip("%s",warnLoopPos.c_str());
|
||||
}
|
||||
popWarningColor();
|
||||
ImGui::EndDisabled();
|
||||
|
||||
if (selColumns>1) {
|
||||
|
|
|
|||
|
|
@ -508,6 +508,14 @@ 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;
|
||||
}
|
||||
if (ImGui::RadioButton("Start with initial system##NSB1",settings.newSongBehavior==1)) {
|
||||
settings.newSongBehavior=1;
|
||||
}
|
||||
|
||||
ImGui::Separator();
|
||||
|
||||
if (CWSliderFloat("Double-click time (seconds)",&settings.doubleClickTime,0.02,1.0,"%.2f")) {
|
||||
|
|
@ -1922,6 +1930,9 @@ void FurnaceGUI::drawSettings() {
|
|||
UI_COLOR_CONFIG(GUI_COLOR_EDITING,"Editing");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_SONG_LOOP,"Song loop");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_PLAYBACK_STAT,"Playback status");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_DESTRUCTIVE,"Destructive hint");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_WARNING,"Warning hint");
|
||||
UI_COLOR_CONFIG(GUI_COLOR_ERROR,"Error hint");
|
||||
ImGui::TreePop();
|
||||
}
|
||||
if (ImGui::TreeNode("File Picker (built-in)")) {
|
||||
|
|
@ -2755,6 +2766,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.renderClearPos=e->getConfInt("renderClearPos",0);
|
||||
settings.insertBehavior=e->getConfInt("insertBehavior",1);
|
||||
settings.pullDeleteRow=e->getConfInt("pullDeleteRow",1);
|
||||
settings.newSongBehavior=e->getConfInt("newSongBehavior",0);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
|
@ -2880,6 +2892,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.renderClearPos,0,1);
|
||||
clampSetting(settings.insertBehavior,0,1);
|
||||
clampSetting(settings.pullDeleteRow,0,1);
|
||||
clampSetting(settings.newSongBehavior,0,1);
|
||||
|
||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
|
@ -3101,6 +3114,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("renderClearPos",settings.renderClearPos);
|
||||
e->setConf("insertBehavior",settings.insertBehavior);
|
||||
e->setConf("pullDeleteRow",settings.pullDeleteRow);
|
||||
e->setConf("newSongBehavior",settings.newSongBehavior);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
@ -3493,6 +3507,35 @@ void FurnaceGUI::popAccentColors() {
|
|||
ImGui::PopStyleColor(24);
|
||||
}
|
||||
|
||||
void FurnaceGUI::pushDestColor() {
|
||||
pushAccentColors(uiColors[GUI_COLOR_DESTRUCTIVE],uiColors[GUI_COLOR_DESTRUCTIVE],uiColors[GUI_COLOR_DESTRUCTIVE],ImVec4(0.0f,0.0f,0.0f,0.0f));
|
||||
}
|
||||
|
||||
void FurnaceGUI::popDestColor() {
|
||||
popAccentColors();
|
||||
}
|
||||
|
||||
void FurnaceGUI::pushWarningColor(bool warnCond, bool errorCond) {
|
||||
if (warnColorPushed) {
|
||||
logE("warnColorPushed");
|
||||
abort();
|
||||
}
|
||||
if (errorCond) {
|
||||
pushAccentColors(uiColors[GUI_COLOR_ERROR],uiColors[GUI_COLOR_ERROR],uiColors[GUI_COLOR_ERROR],ImVec4(0.0f,0.0f,0.0f,0.0f));
|
||||
warnColorPushed=true;
|
||||
} else if (warnCond) {
|
||||
pushAccentColors(uiColors[GUI_COLOR_WARNING],uiColors[GUI_COLOR_WARNING],uiColors[GUI_COLOR_WARNING],ImVec4(0.0f,0.0f,0.0f,0.0f));
|
||||
warnColorPushed=true;
|
||||
}
|
||||
}
|
||||
|
||||
void FurnaceGUI::popWarningColor() {
|
||||
if (warnColorPushed) {
|
||||
popAccentColors();
|
||||
warnColorPushed=false;
|
||||
}
|
||||
}
|
||||
|
||||
#define IGFD_FileStyleByExtension IGFD_FileStyleByExtention
|
||||
|
||||
#ifdef _WIN32
|
||||
|
|
|
|||
|
|
@ -92,6 +92,7 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
|||
ImGui::SetTooltip("Add");
|
||||
}
|
||||
ImGui::SameLine();
|
||||
pushDestColor();
|
||||
if (ImGui::Button(ICON_FA_MINUS "##SubSongDel")) {
|
||||
if (e->song.subsong.size()<=1) {
|
||||
showError("this is the only subsong!");
|
||||
|
|
@ -99,6 +100,7 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
|
|||
showWarning("are you sure you want to remove this subsong?",GUI_WARN_SUBSONG_DEL);
|
||||
}
|
||||
}
|
||||
popDestColor();
|
||||
if (ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("Remove");
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue