GUI: loop start/end hints, part 1
This commit is contained in:
parent
72247f93fb
commit
4af768d280
|
@ -2042,12 +2042,53 @@ void FurnaceGUI::drawSampleEdit() {
|
||||||
}
|
}
|
||||||
dl->PopClipRect();
|
dl->PopClipRect();
|
||||||
|
|
||||||
|
//bool displayLoopHintsNES=false;
|
||||||
|
bool displayLoopHintsSNES=false;
|
||||||
|
//bool displayLoopHintsAmiga=false;
|
||||||
|
|
||||||
|
for (int i=0; i<e->song.systemLen; i++) {
|
||||||
|
/*
|
||||||
|
if (e->song.system[i]==DIV_SYSTEM_NES) {
|
||||||
|
displayLoopHintsNES=true;
|
||||||
|
}*/
|
||||||
|
if (e->song.system[i]==DIV_SYSTEM_SNES) {
|
||||||
|
displayLoopHintsSNES=true;
|
||||||
|
}
|
||||||
|
/*if (e->song.system[i]==DIV_SYSTEM_AMIGA) {
|
||||||
|
displayLoopHintsAmiga=true;
|
||||||
|
}*/
|
||||||
|
}
|
||||||
|
|
||||||
if (displayLoopStartHints) {
|
if (displayLoopStartHints) {
|
||||||
dl->AddText(ImVec2(minArea.x,minArea.y),0xffffffff,"Loop start hints.");
|
if (displayLoopHintsSNES) {
|
||||||
|
if (sampleZoom<0.5) {
|
||||||
|
for (int i=0; i<(int)(sampleZoom*avail.x); i++) {
|
||||||
|
if (((i+samplePos)&15)==0) {
|
||||||
|
ImVec2 p1=ImVec2(rectMin.x+((float)i/sampleZoom),rectMin.y);
|
||||||
|
ImVec2 p2=p1;
|
||||||
|
p2.y=rectMax.y;
|
||||||
|
|
||||||
|
dl->AddLine(p1,p2,ImGui::GetColorU32(uiColors[GUI_COLOR_SAMPLE_NEEDLE]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (displayLoopEndHints) {
|
if (displayLoopEndHints) {
|
||||||
dl->AddText(ImVec2(minArea.x,minArea.y),0xffffffff,"Loop end hints.");
|
if (displayLoopHintsSNES) {
|
||||||
|
if (sampleZoom<0.5) {
|
||||||
|
for (int i=0; i<(int)(sampleZoom*avail.x); i++) {
|
||||||
|
if (((i+samplePos)&15)==0) {
|
||||||
|
ImVec2 p1=ImVec2(rectMin.x+((float)i/sampleZoom),rectMin.y);
|
||||||
|
ImVec2 p2=p1;
|
||||||
|
p2.y=rectMax.y;
|
||||||
|
|
||||||
|
dl->AddLine(p1,p2,ImGui::GetColorU32(uiColors[GUI_COLOR_SAMPLE_NEEDLE]));
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (drawSelection) {
|
if (drawSelection) {
|
||||||
|
|
Loading…
Reference in a new issue