mirror of
https://github.com/MineLittlePony/MineLittlePony.git
synced 2025-04-01 01:05:27 +02:00
Clamp to the ends so it's easier to reach the max/min on the slider.
This commit is contained in:
parent
b45a2a9788
commit
fc734c2334
1 changed files with 8 additions and 0 deletions
|
@ -40,6 +40,14 @@ public class PonyConfig extends JsonConfig {
|
||||||
}
|
}
|
||||||
|
|
||||||
public float setGlobalScaleFactor(float f) {
|
public float setGlobalScaleFactor(float f) {
|
||||||
|
|
||||||
|
if (f < 0.15F) {
|
||||||
|
f = 0.1F;
|
||||||
|
}
|
||||||
|
if (f > 2.95) {
|
||||||
|
f = 3;
|
||||||
|
}
|
||||||
|
|
||||||
f = Math.round(MathHelper.clamp(f, 0.1F, 3) * 100) / 100F;
|
f = Math.round(MathHelper.clamp(f, 0.1F, 3) * 100) / 100F;
|
||||||
|
|
||||||
scaleFactor.set(f);
|
scaleFactor.set(f);
|
||||||
|
|
Loading…
Add table
Reference in a new issue