GUI: more sample editor work
This commit is contained in:
parent
07624f6012
commit
5f0c1e9077
|
@ -58,6 +58,7 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
if (ImGui::Selectable(sampleDepths[i])) {
|
if (ImGui::Selectable(sampleDepths[i])) {
|
||||||
sample->depth=i;
|
sample->depth=i;
|
||||||
e->renderSamplesP();
|
e->renderSamplesP();
|
||||||
|
updateSampleTex=true;
|
||||||
}
|
}
|
||||||
if (ImGui::IsItemHovered()) {
|
if (ImGui::IsItemHovered()) {
|
||||||
ImGui::SetTooltip("no undo for sample type change operations!");
|
ImGui::SetTooltip("no undo for sample type change operations!");
|
||||||
|
@ -86,6 +87,7 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
} else {
|
} else {
|
||||||
sample->loopStart=-1;
|
sample->loopStart=-1;
|
||||||
}
|
}
|
||||||
|
updateSampleTex=true;
|
||||||
}
|
}
|
||||||
if (doLoop) {
|
if (doLoop) {
|
||||||
ImGui::SameLine();
|
ImGui::SameLine();
|
||||||
|
@ -93,6 +95,7 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
if (sample->loopStart<0 || sample->loopStart>=(int)sample->samples) {
|
if (sample->loopStart<0 || sample->loopStart>=(int)sample->samples) {
|
||||||
sample->loopStart=0;
|
sample->loopStart=0;
|
||||||
}
|
}
|
||||||
|
updateSampleTex=true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ImGui::EndTable();
|
ImGui::EndTable();
|
||||||
|
@ -100,13 +103,11 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
|
|
||||||
if (ImGui::InputDouble("Zoom",&sampleZoom,0.1,2.0)) {
|
if (ImGui::InputDouble("Zoom",&sampleZoom,0.1,2.0)) {
|
||||||
if (sampleZoom<0.01) sampleZoom=0.01;
|
if (sampleZoom<0.01) sampleZoom=0.01;
|
||||||
|
|
||||||
updateSampleTex=true;
|
updateSampleTex=true;
|
||||||
}
|
}
|
||||||
if (ImGui::InputInt("Pos",&samplePos,1,10)) {
|
if (ImGui::InputInt("Pos",&samplePos,1,10)) {
|
||||||
if (samplePos>=(int)sample->samples) samplePos=sample->samples-1;
|
if (samplePos>=(int)sample->samples) samplePos=sample->samples-1;
|
||||||
if (samplePos<0) samplePos=0;
|
if (samplePos<0) samplePos=0;
|
||||||
|
|
||||||
updateSampleTex=true;
|
updateSampleTex=true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue