the rest of the add colors

This commit is contained in:
Eknous-P 2023-08-26 16:09:27 +04:00
parent 0dbe1b401f
commit 19f7376337
5 changed files with 15 additions and 1 deletions

View file

@ -4333,18 +4333,21 @@ void FurnaceGUI::drawInsEdit() {
MARK_MODIFIED; MARK_MODIFIED;
} }
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button(ICON_FA_TIMES "##HWCmdDel")) { pushDestColor();
if (ImGui::Button(ICON_FA_MINUS "##HWCmdDel")) {
for (int j=i; j<ins->gb.hwSeqLen-1; j++) { for (int j=i; j<ins->gb.hwSeqLen-1; j++) {
ins->gb.hwSeq[j].cmd=ins->gb.hwSeq[j+1].cmd; ins->gb.hwSeq[j].cmd=ins->gb.hwSeq[j+1].cmd;
ins->gb.hwSeq[j].data=ins->gb.hwSeq[j+1].data; ins->gb.hwSeq[j].data=ins->gb.hwSeq[j+1].data;
} }
ins->gb.hwSeqLen--; ins->gb.hwSeqLen--;
} }
popDestColor();
ImGui::PopID(); ImGui::PopID();
} }
ImGui::EndTable(); ImGui::EndTable();
} }
pushAddColor();
if (ImGui::Button(ICON_FA_PLUS "##HWCmdAdd")) { if (ImGui::Button(ICON_FA_PLUS "##HWCmdAdd")) {
if (ins->gb.hwSeqLen<255) { if (ins->gb.hwSeqLen<255) {
ins->gb.hwSeq[ins->gb.hwSeqLen].cmd=0; ins->gb.hwSeq[ins->gb.hwSeqLen].cmd=0;
@ -4352,6 +4355,7 @@ void FurnaceGUI::drawInsEdit() {
ins->gb.hwSeqLen++; ins->gb.hwSeqLen++;
} }
} }
popAddColor();
} }
ImGui::EndChild(); ImGui::EndChild();
ImGui::EndDisabled(); ImGui::EndDisabled();

View file

@ -106,10 +106,12 @@ void FurnaceGUI::drawOrderButtons() {
buttonColumns++; buttonColumns++;
} }
pushAddColor();
if (ImGui::Button(ICON_FA_PLUS)) { handleUnimportant if (ImGui::Button(ICON_FA_PLUS)) { handleUnimportant
// add order row (new) // add order row (new)
doAction(GUI_ACTION_ORDERS_ADD); doAction(GUI_ACTION_ORDERS_ADD);
} }
popAddColor();
if (ImGui::IsItemHovered()) { if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Add new order"); ImGui::SetTooltip("Add new order");
} }

View file

@ -659,6 +659,7 @@ void FurnaceGUI::drawSettings() {
settings.initialSys.remove(fmt::sprintf("flags%d",sysCount-1)); settings.initialSys.remove(fmt::sprintf("flags%d",sysCount-1));
} }
pushAddColor();
if (sysCount<32) if (ImGui::Button(ICON_FA_PLUS "##InitSysAdd")) { if (sysCount<32) if (ImGui::Button(ICON_FA_PLUS "##InitSysAdd")) {
settings.initialSys.set(fmt::sprintf("id%d",sysCount),(int)e->systemToFileFur(DIV_SYSTEM_YM2612)); settings.initialSys.set(fmt::sprintf("id%d",sysCount),(int)e->systemToFileFur(DIV_SYSTEM_YM2612));
settings.initialSys.set(fmt::sprintf("vol%d",sysCount),1.0f); settings.initialSys.set(fmt::sprintf("vol%d",sysCount),1.0f);
@ -666,6 +667,7 @@ void FurnaceGUI::drawSettings() {
settings.initialSys.set(fmt::sprintf("fr%d",sysCount),0.0f); settings.initialSys.set(fmt::sprintf("fr%d",sysCount),0.0f);
settings.initialSys.set(fmt::sprintf("flags%d",sysCount),""); settings.initialSys.set(fmt::sprintf("flags%d",sysCount),"");
} }
popAddColor();
ImGui::Text("When creating new song:"); ImGui::Text("When creating new song:");
ImGui::Indent(); ImGui::Indent();
@ -978,9 +980,11 @@ void FurnaceGUI::drawSettings() {
ImGui::AlignTextToFramePadding(); ImGui::AlignTextToFramePadding();
ImGui::Text("Actions:"); ImGui::Text("Actions:");
ImGui::SameLine(); ImGui::SameLine();
pushAddColor();
if (ImGui::Button(ICON_FA_PLUS "##AddAction")) { if (ImGui::Button(ICON_FA_PLUS "##AddAction")) {
midiMap.binds.push_back(MIDIBind()); midiMap.binds.push_back(MIDIBind());
} }
popAddColor();
ImGui::SameLine(); ImGui::SameLine();
if (ImGui::Button(ICON_FA_EXTERNAL_LINK "##AddLearnAction")) { if (ImGui::Button(ICON_FA_EXTERNAL_LINK "##AddLearnAction")) {
midiMap.binds.push_back(MIDIBind()); midiMap.binds.push_back(MIDIBind());

View file

@ -70,6 +70,7 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
ImGui::EndCombo(); ImGui::EndCombo();
} }
ImGui::SameLine(); ImGui::SameLine();
pushAddColor();
if (ImGui::Button(ICON_FA_PLUS "##SubSongAdd")) { if (ImGui::Button(ICON_FA_PLUS "##SubSongAdd")) {
if (!e->addSubSong()) { if (!e->addSubSong()) {
showError("too many subsongs!"); showError("too many subsongs!");
@ -88,6 +89,7 @@ void FurnaceGUI::drawSubSongs(bool asChild) {
MARK_MODIFIED; MARK_MODIFIED;
} }
} }
popAddColor();
if (ImGui::IsItemHovered()) { if (ImGui::IsItemHovered()) {
ImGui::SetTooltip("Add"); ImGui::SetTooltip("Add");
} }

View file

@ -118,6 +118,7 @@ void FurnaceGUI::drawSysManager() {
ImGui::TableNextRow(); ImGui::TableNextRow();
ImGui::TableNextColumn(); ImGui::TableNextColumn();
ImGui::TableNextColumn(); ImGui::TableNextColumn();
pushAddColor();
ImGui::Button(ICON_FA_PLUS "##SysAdd"); ImGui::Button(ICON_FA_PLUS "##SysAdd");
if (ImGui::BeginPopupContextItem("SysPickerA",ImGuiPopupFlags_MouseButtonLeft)) { if (ImGui::BeginPopupContextItem("SysPickerA",ImGuiPopupFlags_MouseButtonLeft)) {
DivSystem picked=systemPicker(); DivSystem picked=systemPicker();
@ -135,6 +136,7 @@ void FurnaceGUI::drawSysManager() {
} }
ImGui::EndPopup(); ImGui::EndPopup();
} }
popAddColor();
} }
ImGui::EndTable(); ImGui::EndTable();
} }