effect searching

This commit is contained in:
Eknous-P 2024-02-03 23:36:14 +04:00 committed by tildearrow
parent 3970e5a49d
commit a25a3be4d1
2 changed files with 6 additions and 3 deletions

View file

@ -17,8 +17,9 @@ void FurnaceGUI::drawEffectList() {
ImGui::PushTextWrapPos(availB);
ImGui::TextWrapped("Chip at cursor: %s",e->getSystemName(e->sysOfChan[cursor.xCoarse]));
ImGui::PopTextWrapPos();
ImGui::SameLine();
}
effectSearch.Draw();
ImGui::SameLine();
ImGui::Button(ICON_FA_BARS "##SortEffects");
if (ImGui::BeginPopupContextItem("effectSort",ImGuiPopupFlags_MouseButtonLeft)) {
for (int i=1; i<10; i++) {
@ -65,7 +66,8 @@ void FurnaceGUI::drawEffectList() {
}
}
}
if (name!=NULL && effectsShow[fxColors[i]-GUI_COLOR_PATTERN_EFFECT_INVALID]) {
if (name==NULL) continue;
if (effectSearch.PassFilter(name) && effectsShow[fxColors[i]-GUI_COLOR_PATTERN_EFFECT_INVALID]) {
ImGui::TableNextRow();
ImGui::TableNextColumn();
ImGui::PushFont(patFont);

View file

@ -2345,8 +2345,9 @@ class FurnaceGUI {
int pianoOffset, pianoOffsetEdit;
int pianoView, pianoInputPadMode;
// effect sorting
// effect sorting / searching
bool effectsShow[10];
ImGuiTextFilter effectSearch;
// TX81Z
bool hasACED;