fix shrinking sliders on sliders with odd amount of repeats when using fallback rendering (close #108)
This commit is contained in:
parent
d9669ddcd5
commit
d7d28a559b
|
@ -434,17 +434,15 @@ public class Slider extends GameObject {
|
||||||
}
|
}
|
||||||
game.setSlidercurveTo(baseSliderFrom + (int) (curveIntervalTo * curve.getCurvePoints().length));
|
game.setSlidercurveTo(baseSliderFrom + (int) (curveIntervalTo * curve.getCurvePoints().length));
|
||||||
} else {
|
} else {
|
||||||
if (Options.isFallbackSliders() && curveIntervalFrom > 0 && repeats % 2 == 0) {
|
if (Options.isShrinkingSliders() && curveIntervalFrom > 0 && repeats % 2 == 0) {
|
||||||
curve.draw(curveColor, (int) (curveIntervalFrom * curvelen), (int) (curveIntervalTo * curvelen));
|
if (Options.isFallbackSliders()) {
|
||||||
} else {
|
curveIntervalTo = 1d - curveIntervalFrom;
|
||||||
if (Options.isShrinkingSliders() && curveIntervalFrom > 0 && !Options.isFallbackSliders()) {
|
} else {
|
||||||
if (repeats % 2 == 0) {
|
curve.splice((int) ((1d - curveIntervalFrom) * curvelen), curvelen);
|
||||||
curve.splice((int) ((1d - curveIntervalFrom) * curvelen), curvelen);
|
|
||||||
curveIntervalFrom = 0d;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
curve.draw(curveColor, (int) (curveIntervalFrom * curvelen), (int) (curveIntervalTo * curvelen));
|
curveIntervalFrom = 0d;
|
||||||
}
|
}
|
||||||
|
curve.draw(curveColor, (int) (curveIntervalFrom * curvelen), (int) (curveIntervalTo * curvelen));
|
||||||
}
|
}
|
||||||
return curveIntervalTo == 1d;
|
return curveIntervalTo == 1d;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user