X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fmain%2Fjava%2Fnet%2Fpterodactylus%2Fsonitus%2Fdata%2Fcontroller%2FFader.java;h=c603199cc8ecb426f00fa1f11470f342b9d924aa;hb=4371ab7e900c5cc47aa4c18e6b125581a3accb2e;hp=4cb6f28235e67022aee20346b5bd127f8b9318b3;hpb=7fd39e525f49730b76e756b613f20b9dd72808b9;p=sonitus.git diff --git a/src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java b/src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java index 4cb6f28..c603199 100644 --- a/src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java +++ b/src/main/java/net/pterodactylus/sonitus/data/controller/Fader.java @@ -24,21 +24,28 @@ import net.pterodactylus.sonitus.data.Controller; * * @author David ‘Bombe’ Roden */ -public abstract class Fader extends AbstractController { +public class Fader extends AbstractController { - /** Creates a new fader that is at maximum position. */ - public Fader() { - this(1.0); + /** + * Creates a new fader that is at maximum position. + * + * @param name + * The name of the fader + */ + public Fader(String name) { + this(name, 1.0); } /** * Creates a new fader that is at the given position. * + * @param name + * The name of the fader * @param currentValue * The current value of the fader (from {@code 0.0} to {@code 1.0}) */ - public Fader(double currentValue) { - super(0, Integer.MAX_VALUE, false, (int) (Math.max(0, Math.min(1, currentValue)) * Integer.MAX_VALUE)); + public Fader(String name, Double currentValue) { + super(name, 0.0, 1.0, false, currentValue); } }