GUI: fix pattern once again

This commit is contained in:
tildearrow 2023-02-21 03:15:35 -05:00
parent ff7110cb05
commit 8309c0d279

View file

@ -1140,7 +1140,7 @@ void FurnaceGUI::drawPattern() {
for (int j=0; j<num; j++) { for (int j=0; j<num; j++) {
ImVec2 partPos=ImVec2( ImVec2 partPos=ImVec2(
off.x+patChanX[i.chan]+fmod(rand(),width)-scrollX, off.x+patChanX[i.chan]+fmod(rand(),width),
off.y+(ImGui::GetWindowHeight()*0.5f)+randRange(0,patFont->FontSize) off.y+(ImGui::GetWindowHeight()*0.5f)+randRange(0,patFont->FontSize)
); );
@ -1174,7 +1174,7 @@ void FurnaceGUI::drawPattern() {
float width=patChanX[i+1]-patChanX[i]; float width=patChanX[i+1]-patChanX[i];
ImVec2 partPos=ImVec2( ImVec2 partPos=ImVec2(
off.x+patChanX[i]+fmod(rand(),width)-scrollX, off.x+patChanX[i]+fmod(rand(),width),
off.y+fmod(rand(),MAX(1,ImGui::GetWindowHeight())) off.y+fmod(rand(),MAX(1,ImGui::GetWindowHeight()))
); );
@ -1231,7 +1231,7 @@ void FurnaceGUI::drawPattern() {
float width=patChanX[i+1]-patChanX[i]; float width=patChanX[i+1]-patChanX[i];
ImVec2 partPos=ImVec2( ImVec2 partPos=ImVec2(
off.x+patChanX[i]+(width*0.5+0.5*sin(M_PI*(float)ch->vibratoPosGiant/64.0f)*width)-scrollX, off.x+patChanX[i]+(width*0.5+0.5*sin(M_PI*(float)ch->vibratoPosGiant/64.0f)*width),
off.y+(ImGui::GetWindowHeight()*0.5f)+randRange(0,patFont->FontSize) off.y+(ImGui::GetWindowHeight()*0.5f)+randRange(0,patFont->FontSize)
); );