please work

This commit is contained in:
YohananDiamond 2023-06-03 16:54:52 -03:00
parent 02c316f9d1
commit 169b664837
1 changed files with 3 additions and 1 deletions

View File

@ -287,7 +287,9 @@ void FurnaceGUI::insListItem(int i, int dir, int asset) {
} else {
ImGui::PushStyleColor(ImGuiCol_Text,uiColors[GUI_COLOR_TEXT]);
}
if (ImGui::Selectable(name.c_str(),(i==-1)?(curIns<0 || curIns>=e->song.insLen):(curIns==i))) {
bool insReleased=ImGui::Selectable(name.c_str(),(i==-1)?(curIns<0 || curIns>=e->song.insLen):(curIns==i));
bool insPressed=ImGui::IsItemActivated();
if (insReleased || (!insListDir && insPressed)) {
curIns=i;
wavePreviewInit=true;
updateFMPreview=true;