mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-30 08:23:01 +00:00
GUI: add single-digit effects for 00-0F setting
This commit is contained in:
parent
2cfed1336a
commit
c60aceec8b
3 changed files with 15 additions and 1 deletions
|
@ -1295,6 +1295,7 @@ class FurnaceGUI {
|
|||
double exportFadeOut;
|
||||
int macroLayout;
|
||||
float doubleClickTime;
|
||||
int oneDigitEffects;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -1430,6 +1431,7 @@ class FurnaceGUI {
|
|||
exportFadeOut(0.0),
|
||||
macroLayout(0),
|
||||
doubleClickTime(0.3f),
|
||||
oneDigitEffects(0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -287,10 +287,14 @@ inline void FurnaceGUI::patternRow(int i, bool isPlaying, float lineHeight, int
|
|||
if (pat->data[i][index]>0xff) {
|
||||
snprintf(id,63,"??##PE%d_%d_%d",k,i,j);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_PATTERN_EFFECT_INVALID]);
|
||||
} else {
|
||||
} else if (pat->data[i][index]>0x10 || settings.oneDigitEffects==0) {
|
||||
const unsigned char data=pat->data[i][index];
|
||||
snprintf(id,63,"%.2X##PE%d_%d_%d",data,k,i,j);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[fxColors[data]]);
|
||||
} else {
|
||||
const unsigned char data=pat->data[i][index];
|
||||
snprintf(id,63," %.1X##PE%d_%d_%d",data,k,i,j);
|
||||
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[fxColors[data]]);
|
||||
}
|
||||
}
|
||||
ImGui::SameLine(0.0f,0.0f);
|
||||
|
|
|
@ -1602,6 +1602,11 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.germanNotation=germanNotationB;
|
||||
}
|
||||
|
||||
bool oneDigitEffectsB=settings.oneDigitEffects;
|
||||
if (ImGui::Checkbox("Single-digit effects for 00-0F",&oneDigitEffectsB)) {
|
||||
settings.oneDigitEffects=oneDigitEffectsB;
|
||||
}
|
||||
|
||||
bool centerPatternB=settings.centerPattern;
|
||||
if (ImGui::Checkbox("Center pattern view",¢erPatternB)) {
|
||||
settings.centerPattern=centerPatternB;
|
||||
|
@ -2565,6 +2570,7 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.exportFadeOut=e->getConfDouble("exportFadeOut",0.0);
|
||||
settings.macroLayout=e->getConfInt("macroLayout",0);
|
||||
settings.doubleClickTime=e->getConfFloat("doubleClickTime",0.3f);
|
||||
settings.oneDigitEffects=e->getConfInt("oneDigitEffects",0);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
@ -2676,6 +2682,7 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.persistFadeOut,0,1);
|
||||
clampSetting(settings.macroLayout,0,4);
|
||||
clampSetting(settings.doubleClickTime,0.02,1.0);
|
||||
clampSetting(settings.oneDigitEffects,0,1);
|
||||
|
||||
if (settings.exportLoops<0.0) settings.exportLoops=0.0;
|
||||
if (settings.exportFadeOut<0.0) settings.exportFadeOut=0.0;
|
||||
|
@ -2880,6 +2887,7 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("exportFadeOut",settings.exportFadeOut);
|
||||
e->setConf("macroLayout",settings.macroLayout);
|
||||
e->setConf("doubleClickTime",settings.doubleClickTime);
|
||||
e->setConf("oneDigitEffects",settings.oneDigitEffects);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
Loading…
Reference in a new issue