broken shit
This commit is contained in:
parent
0edfc893ab
commit
5ccad6b10a
16 changed files with 149 additions and 24 deletions
|
@ -1,6 +1,9 @@
|
|||
package me.kawaiizenbo.moonlight.module.settings;
|
||||
|
||||
import java.lang.reflect.Method;
|
||||
|
||||
import me.kawaiizenbo.moonlight.util.MathUtils;
|
||||
import me.kawaiizenbo.moonlight.util.ReflectionUtils;
|
||||
import net.minecraft.client.gui.DrawContext;
|
||||
import net.minecraft.text.Text;
|
||||
|
||||
|
@ -12,10 +15,11 @@ public class DoubleSetting extends Setting
|
|||
|
||||
boolean sliding = false;
|
||||
|
||||
public DoubleSetting(String name, double value, double min, double max, int roundingPlace)
|
||||
public DoubleSetting(String name, double value, double min, double max, int roundingPlace, Method onValueChanged)
|
||||
{
|
||||
this.name = name;
|
||||
this.value = value;
|
||||
this.onValueChanged = onValueChanged;
|
||||
this.min = min;
|
||||
this.max = max;
|
||||
this.roundingPlace = roundingPlace;
|
||||
|
@ -62,6 +66,7 @@ public class DoubleSetting extends Setting
|
|||
public void mouseReleased(double mouseX, double mouseY, int button)
|
||||
{
|
||||
sliding = false;
|
||||
ReflectionUtils.tryCallMethod(onValueChanged, new Object[0]);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue