some pushaddcolor's and improve grooves
This commit is contained in:
parent
9e405e86fa
commit
0dbe1b401f
|
@ -253,6 +253,7 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
||||||
}
|
}
|
||||||
if (began) {
|
if (began) {
|
||||||
if (settings.unifiedDataView) settings.horizontalDataView=0;
|
if (settings.unifiedDataView) settings.horizontalDataView=0;
|
||||||
|
pushAddColor();
|
||||||
if (ImGui::Button(ICON_FA_PLUS "##InsAdd")) {
|
if (ImGui::Button(ICON_FA_PLUS "##InsAdd")) {
|
||||||
if (settings.unifiedDataView) {
|
if (settings.unifiedDataView) {
|
||||||
switch (lastAssetType) {
|
switch (lastAssetType) {
|
||||||
|
@ -270,6 +271,7 @@ void FurnaceGUI::drawInsList(bool asChild) {
|
||||||
doAction(GUI_ACTION_INS_LIST_ADD);
|
doAction(GUI_ACTION_INS_LIST_ADD);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
popAddColor();
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("Add");
|
ImGui::SetTooltip("Add");
|
||||||
}
|
}
|
||||||
|
@ -657,9 +659,11 @@ void FurnaceGUI::drawWaveList(bool asChild) {
|
||||||
began=ImGui::Begin("Wavetables",&waveListOpen,globalWinFlags);
|
began=ImGui::Begin("Wavetables",&waveListOpen,globalWinFlags);
|
||||||
}
|
}
|
||||||
if (began) {
|
if (began) {
|
||||||
|
pushAddColor();
|
||||||
if (ImGui::Button(ICON_FA_PLUS "##WaveAdd")) {
|
if (ImGui::Button(ICON_FA_PLUS "##WaveAdd")) {
|
||||||
doAction(GUI_ACTION_WAVE_LIST_ADD);
|
doAction(GUI_ACTION_WAVE_LIST_ADD);
|
||||||
}
|
}
|
||||||
|
popAddColor();
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("Add");
|
ImGui::SetTooltip("Add");
|
||||||
}
|
}
|
||||||
|
|
|
@ -47,13 +47,14 @@ void FurnaceGUI::drawGrooves() {
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("pattern");
|
ImGui::Text("pattern");
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::Text("remove");
|
// ImGui::Text("remove"); removed because the text clips from the fixed width
|
||||||
|
|
||||||
int index=0;
|
int index=0;
|
||||||
for (DivGroovePattern& i: e->song.grooves) {
|
for (DivGroovePattern& i: e->song.grooves) {
|
||||||
ImGui::TableNextRow();
|
ImGui::TableNextRow();
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
ImGui::PushFont(patFont);
|
ImGui::PushFont(patFont);
|
||||||
|
ImGui::AlignTextToFramePadding();
|
||||||
ImGui::Text("%.2X",index);
|
ImGui::Text("%.2X",index);
|
||||||
ImGui::PopFont();
|
ImGui::PopFont();
|
||||||
|
|
||||||
|
@ -79,6 +80,7 @@ void FurnaceGUI::drawGrooves() {
|
||||||
ImGui::SetKeyboardFocusHere();
|
ImGui::SetKeyboardFocusHere();
|
||||||
}
|
}
|
||||||
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
ImGui::SetNextItemWidth(ImGui::GetContentRegionAvail().x);
|
||||||
|
ImGui::AlignTextToFramePadding();
|
||||||
if (ImGui::InputText(grooveStr.c_str(),&grooveListString)) {
|
if (ImGui::InputText(grooveStr.c_str(),&grooveListString)) {
|
||||||
decodeMMLStr(grooveListString,intVersion,intVersionLen,ignoredLoop,1,255,ignoredRel);
|
decodeMMLStr(grooveListString,intVersion,intVersionLen,ignoredLoop,1,255,ignoredRel);
|
||||||
if (intVersionLen<1) {
|
if (intVersionLen<1) {
|
||||||
|
@ -120,10 +122,15 @@ void FurnaceGUI::drawGrooves() {
|
||||||
}
|
}
|
||||||
|
|
||||||
ImGui::TableNextColumn();
|
ImGui::TableNextColumn();
|
||||||
String grooveID=fmt::sprintf(ICON_FA_TIMES "##GRR%d",index);
|
pushDestColor();
|
||||||
|
String grooveID=fmt::sprintf(ICON_FA_MINUS "##GRR%d",index);
|
||||||
if (ImGui::Button(grooveID.c_str())) {
|
if (ImGui::Button(grooveID.c_str())) {
|
||||||
delGroove=index;
|
delGroove=index;
|
||||||
}
|
}
|
||||||
|
if (ImGui::IsItemHovered()) {
|
||||||
|
ImGui::SetTooltip("remove");
|
||||||
|
}
|
||||||
|
popDestColor();
|
||||||
|
|
||||||
index++;
|
index++;
|
||||||
}
|
}
|
||||||
|
@ -138,12 +145,14 @@ void FurnaceGUI::drawGrooves() {
|
||||||
MARK_MODIFIED;
|
MARK_MODIFIED;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pushAddColor();
|
||||||
if (ImGui::Button(ICON_FA_PLUS "##AddGroove")) {
|
if (ImGui::Button(ICON_FA_PLUS "##AddGroove")) {
|
||||||
e->lockEngine([this]() {
|
e->lockEngine([this]() {
|
||||||
e->song.grooves.push_back(DivGroovePattern());
|
e->song.grooves.push_back(DivGroovePattern());
|
||||||
});
|
});
|
||||||
MARK_MODIFIED;
|
MARK_MODIFIED;
|
||||||
}
|
}
|
||||||
|
popAddColor();
|
||||||
}
|
}
|
||||||
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) {
|
if (ImGui::IsWindowFocused(ImGuiFocusedFlags_ChildWindows)) {
|
||||||
curWindow=GUI_WINDOW_GROOVES;
|
curWindow=GUI_WINDOW_GROOVES;
|
||||||
|
|
Loading…
Reference in a new issue