mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-05 04:15:05 +00:00
GUI: add "Use standard OPL waveform names" option
This commit is contained in:
parent
95580d9f1a
commit
be483470ef
3 changed files with 26 additions and 2 deletions
|
@ -816,6 +816,8 @@ class FurnaceGUI {
|
|||
int metroVol;
|
||||
int pushNibble;
|
||||
int scrollChangesOrder;
|
||||
int oplStandardWaveNames;
|
||||
int cursorMoveNoScroll;
|
||||
unsigned int maxUndoSteps;
|
||||
String mainFontPath;
|
||||
String patFontPath;
|
||||
|
@ -885,6 +887,8 @@ class FurnaceGUI {
|
|||
metroVol(100),
|
||||
pushNibble(0),
|
||||
scrollChangesOrder(0),
|
||||
oplStandardWaveNames(0),
|
||||
cursorMoveNoScroll(0),
|
||||
maxUndoSteps(100),
|
||||
mainFontPath(""),
|
||||
patFontPath(""),
|
||||
|
|
|
@ -67,6 +67,10 @@ const char* oplWaveforms[8]={
|
|||
"Sine", "Half Sine", "Absolute Sine", "Quarter Sine", "Squished Sine", "Squished AbsSine", "Square", "Derived Square"
|
||||
};
|
||||
|
||||
const char* oplWaveformsStandard[8]={
|
||||
"Sine", "Half Sine", "Absolute Sine", "Pulse Sine", "Sine (Even Periods)", "AbsSine (Even Periods)", "Square", "Derived Square"
|
||||
};
|
||||
|
||||
const char* opzWaveforms[8]={
|
||||
"Sine", "Triangle", "Cut Sine", "Cut Triangle", "Squished Sine", "Squished Triangle", "Squished AbsSine", "Squished AbsTriangle"
|
||||
};
|
||||
|
@ -1832,7 +1836,7 @@ void FurnaceGUI::drawInsEdit() {
|
|||
|
||||
drawWaveform(op.ws&7,ins->type==DIV_INS_OPZ,ImVec2(ImGui::GetContentRegionAvail().x,sliderHeight-ImGui::GetFrameHeightWithSpacing()));
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
P(CWSliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:oplWaveforms[op.ws&7])); rightClickable
|
||||
P(CWSliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:(settings.oplStandardWaveNames?oplWaveformsStandard[op.ws&7]:oplWaveforms[op.ws&7]))); rightClickable
|
||||
if (ins->type==DIV_INS_OPL && ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("OPL2/3 only (last 4 waveforms are OPL3 only)");
|
||||
}
|
||||
|
@ -2086,7 +2090,7 @@ void FurnaceGUI::drawInsEdit() {
|
|||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||
P(CWSliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:oplWaveforms[op.ws&7])); rightClickable
|
||||
P(CWSliderScalar("##WS",ImGuiDataType_U8,&op.ws,&_ZERO,&_SEVEN,(ins->type==DIV_INS_OPZ)?opzWaveforms[op.ws&7]:(settings.oplStandardWaveNames?oplWaveformsStandard[op.ws&7]:oplWaveforms[op.ws&7]))); rightClickable
|
||||
if (ins->type==DIV_INS_OPL && ImGui::IsItemHovered()) {
|
||||
ImGui::SetTooltip("OPL2/3 only (last 4 waveforms are OPL3 only)");
|
||||
}
|
||||
|
|
|
@ -271,6 +271,11 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.cursorPastePos=cursorPastePosB;
|
||||
}
|
||||
|
||||
bool cursorMoveNoScrollB=settings.cursorMoveNoScroll;
|
||||
if (ImGui::Checkbox("Don't scroll when moving cursor",&cursorMoveNoScrollB)) {
|
||||
settings.cursorMoveNoScroll=cursorMoveNoScrollB;
|
||||
}
|
||||
|
||||
bool allowEditDockingB=settings.allowEditDocking;
|
||||
if (ImGui::Checkbox("Allow docking editors",&allowEditDockingB)) {
|
||||
settings.allowEditDocking=allowEditDockingB;
|
||||
|
@ -885,6 +890,11 @@ void FurnaceGUI::drawSettings() {
|
|||
settings.chipNames=chipNamesB;
|
||||
}
|
||||
|
||||
bool oplStandardWaveNamesB=settings.oplStandardWaveNames;
|
||||
if (ImGui::Checkbox("Use standard OPL waveform names",&oplStandardWaveNamesB)) {
|
||||
settings.oplStandardWaveNames=oplStandardWaveNamesB;
|
||||
}
|
||||
|
||||
bool overflowHighlightB=settings.overflowHighlight;
|
||||
if (ImGui::Checkbox("Overflow pattern highlights",&overflowHighlightB)) {
|
||||
settings.overflowHighlight=overflowHighlightB;
|
||||
|
@ -1588,6 +1598,8 @@ void FurnaceGUI::syncSettings() {
|
|||
settings.metroVol=e->getConfInt("metroVol",100);
|
||||
settings.pushNibble=e->getConfInt("pushNibble",0);
|
||||
settings.scrollChangesOrder=e->getConfInt("scrollChangesOrder",0);
|
||||
settings.oplStandardWaveNames=e->getConfInt("oplStandardWaveNames",0);
|
||||
settings.cursorMoveNoScroll=e->getConfInt("cursorMoveNoScroll",0);
|
||||
|
||||
clampSetting(settings.mainFontSize,2,96);
|
||||
clampSetting(settings.patFontSize,2,96);
|
||||
|
@ -1646,6 +1658,8 @@ void FurnaceGUI::syncSettings() {
|
|||
clampSetting(settings.metroVol,0,200);
|
||||
clampSetting(settings.pushNibble,0,1);
|
||||
clampSetting(settings.scrollChangesOrder,0,1);
|
||||
clampSetting(settings.oplStandardWaveNames,0,1);
|
||||
clampSetting(settings.cursorMoveNoScroll,0,1);
|
||||
|
||||
// keybinds
|
||||
for (int i=0; i<GUI_ACTION_MAX; i++) {
|
||||
|
@ -1731,6 +1745,8 @@ void FurnaceGUI::commitSettings() {
|
|||
e->setConf("metroVol",settings.metroVol);
|
||||
e->setConf("pushNibble",settings.pushNibble);
|
||||
e->setConf("scrollChangesOrder",settings.scrollChangesOrder);
|
||||
e->setConf("oplStandardWaveNames",settings.oplStandardWaveNames);
|
||||
e->setConf("cursorMoveNoScroll",settings.cursorMoveNoScroll);
|
||||
|
||||
// colors
|
||||
for (int i=0; i<GUI_COLOR_MAX; i++) {
|
||||
|
|
Loading…
Reference in a new issue