mirror of
https://github.com/tildearrow/furnace.git
synced 2024-11-23 21:15:11 +00:00
GUI: there we go
now the buttons won't scroll in lists
This commit is contained in:
parent
f03b410281
commit
507f3d7de1
1 changed files with 37 additions and 27 deletions
|
@ -1911,12 +1911,15 @@ void FurnaceGUI::drawWaveList() {
|
|||
}
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::BeginTable("WaveListScroll",1,ImGuiTableFlags_ScrollY)) {
|
||||
for (int i=0; i<(int)e->song.wave.size(); i++) {
|
||||
DivWavetable* wave=e->song.wave[i];
|
||||
for (int i=0; i<wave->len; i++) {
|
||||
wavePreview[i]=wave->data[i];
|
||||
}
|
||||
if (wave->len>0) wavePreview[wave->len]=wave->data[wave->len-1];
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
if (ImGui::Selectable(fmt::sprintf("%d##_WAVE%d\n",i,i).c_str(),curWave==i)) {
|
||||
curWave=i;
|
||||
}
|
||||
|
@ -1928,6 +1931,8 @@ void FurnaceGUI::drawWaveList() {
|
|||
ImGui::SameLine();
|
||||
PlotNoLerp(fmt::sprintf("##_WAVEP%d",i).c_str(),wavePreview,wave->len+1,0,NULL,0,wave->max);
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
}
|
||||
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_WAVE_LIST;
|
||||
ImGui::End();
|
||||
|
@ -2046,8 +2051,11 @@ void FurnaceGUI::drawSampleList() {
|
|||
e->stopSamplePreview();
|
||||
}
|
||||
ImGui::Separator();
|
||||
if (ImGui::BeginTable("SampleListScroll",1,ImGuiTableFlags_ScrollY)) {
|
||||
for (int i=0; i<(int)e->song.sample.size(); i++) {
|
||||
DivSample* sample=e->song.sample[i];
|
||||
ImGui::TableNextRow();
|
||||
ImGui::TableNextColumn();
|
||||
if ((i%12)==0) {
|
||||
if (i>0) ImGui::Unindent();
|
||||
ImGui::Text("Bank %d",i/12);
|
||||
|
@ -2062,6 +2070,8 @@ void FurnaceGUI::drawSampleList() {
|
|||
}
|
||||
}
|
||||
}
|
||||
ImGui::EndTable();
|
||||
}
|
||||
ImGui::Unindent();
|
||||
}
|
||||
if (ImGui::IsWindowFocused()) curWindow=GUI_WINDOW_SAMPLE_LIST;
|
||||
|
|
Loading…
Reference in a new issue