GUI: order buttons
This commit is contained in:
parent
dbf0d3fd88
commit
e093e00225
|
@ -403,14 +403,26 @@ void FurnaceGUI::drawOrders() {
|
||||||
snprintf(selID,16,"%.2x##O_%.2x_%.2x",e->song.orders.ord[j][i],j,i);
|
snprintf(selID,16,"%.2x##O_%.2x_%.2x",e->song.orders.ord[j][i],j,i);
|
||||||
if (ImGui::Selectable(selID)) {
|
if (ImGui::Selectable(selID)) {
|
||||||
if (e->getOrder()==i) {
|
if (e->getOrder()==i) {
|
||||||
if (e->song.orders.ord[j][i]<0x7f) e->song.orders.ord[j][i]++;
|
if (changeAllOrders) {
|
||||||
|
for (int k=0; k<e->getChannelCount(e->song.system); k++) {
|
||||||
|
if (e->song.orders.ord[k][i]<0x7f) e->song.orders.ord[k][i]++;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (e->song.orders.ord[j][i]<0x7f) e->song.orders.ord[j][i]++;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
e->setOrder(i);
|
e->setOrder(i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
if (ImGui::IsItemClicked(ImGuiMouseButton_Right)) {
|
||||||
if (e->getOrder()==i) {
|
if (e->getOrder()==i) {
|
||||||
if (e->song.orders.ord[j][i]>0) e->song.orders.ord[j][i]--;
|
if (changeAllOrders) {
|
||||||
|
for (int k=0; k<e->getChannelCount(e->song.system); k++) {
|
||||||
|
if (e->song.orders.ord[k][i]>0) e->song.orders.ord[k][i]--;
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
if (e->song.orders.ord[j][i]>0) e->song.orders.ord[j][i]--;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
e->setOrder(i);
|
e->setOrder(i);
|
||||||
}
|
}
|
||||||
|
@ -421,12 +433,27 @@ void FurnaceGUI::drawOrders() {
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
}
|
}
|
||||||
ImGui::NextColumn();
|
ImGui::NextColumn();
|
||||||
ImGui::Button(ICON_FA_PLUS);
|
if (ImGui::Button(ICON_FA_PLUS)) {
|
||||||
ImGui::Button(ICON_FA_MINUS);
|
// add order row (new)
|
||||||
ImGui::Button(ICON_FA_FILES_O);
|
}
|
||||||
ImGui::Button(ICON_FA_ANGLE_UP);
|
if (ImGui::Button(ICON_FA_MINUS)) {
|
||||||
ImGui::Button(ICON_FA_ANGLE_DOWN);
|
// remove this order row
|
||||||
ImGui::Button(ICON_FA_ANGLE_DOUBLE_DOWN);
|
}
|
||||||
|
if (ImGui::Button(ICON_FA_FILES_O)) {
|
||||||
|
// duplicate order row
|
||||||
|
}
|
||||||
|
if (ImGui::Button(ICON_FA_ANGLE_UP)) {
|
||||||
|
// move order row up
|
||||||
|
}
|
||||||
|
if (ImGui::Button(ICON_FA_ANGLE_DOWN)) {
|
||||||
|
// move order row down
|
||||||
|
}
|
||||||
|
if (ImGui::Button(ICON_FA_ANGLE_DOUBLE_DOWN)) {
|
||||||
|
// duplicate order row at end
|
||||||
|
}
|
||||||
|
if (ImGui::Button(changeAllOrders?"1##ChangeAll":"A##ChangeAll")) {
|
||||||
|
// whether to change one or all orders in a row
|
||||||
|
}
|
||||||
ImGui::PopStyleVar();
|
ImGui::PopStyleVar();
|
||||||
}
|
}
|
||||||
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_ORDERS;
|
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_ORDERS;
|
||||||
|
@ -2345,6 +2372,7 @@ FurnaceGUI::FurnaceGUI():
|
||||||
extraChannelButtons(false),
|
extraChannelButtons(false),
|
||||||
followOrders(true),
|
followOrders(true),
|
||||||
followPattern(true),
|
followPattern(true),
|
||||||
|
changeAllOrders(false),
|
||||||
curWindow(GUI_WINDOW_NOTHING),
|
curWindow(GUI_WINDOW_NOTHING),
|
||||||
arpMacroScroll(0),
|
arpMacroScroll(0),
|
||||||
macroDragStart(0,0),
|
macroDragStart(0,0),
|
||||||
|
|
|
@ -97,7 +97,7 @@ class FurnaceGUI {
|
||||||
bool editControlsOpen, ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
|
bool editControlsOpen, ordersOpen, insListOpen, songInfoOpen, patternOpen, insEditOpen;
|
||||||
bool waveListOpen, waveEditOpen, sampleListOpen, sampleEditOpen, aboutOpen, settingsOpen;
|
bool waveListOpen, waveEditOpen, sampleListOpen, sampleEditOpen, aboutOpen, settingsOpen;
|
||||||
SelectionPoint selStart, selEnd;
|
SelectionPoint selStart, selEnd;
|
||||||
bool selecting, curNibble, extraChannelButtons, followOrders, followPattern;
|
bool selecting, curNibble, extraChannelButtons, followOrders, followPattern, changeAllOrders;
|
||||||
FurnaceGUIWindows curWindow;
|
FurnaceGUIWindows curWindow;
|
||||||
|
|
||||||
std::map<SDL_Keycode,int> noteKeys;
|
std::map<SDL_Keycode,int> noteKeys;
|
||||||
|
|
Loading…
Reference in a new issue