mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-17 16:47:14 -04:00
Updated constructors fcontrolData with a default pos to the center
This commit is contained in:
parent
d0b75ee888
commit
5de6ba4633
@ -84,11 +84,15 @@ public class ControlData implements Cloneable
|
|||||||
public Object specialButtonListener;
|
public Object specialButtonListener;
|
||||||
|
|
||||||
public ControlData() {
|
public ControlData() {
|
||||||
this("", new int[]{LWJGLGLFWKeycode.GLFW_KEY_UNKNOWN}, 0, 0);
|
this("button");
|
||||||
|
}
|
||||||
|
|
||||||
|
public ControlData(String name){
|
||||||
|
this(name, new int[] {});
|
||||||
}
|
}
|
||||||
|
|
||||||
public ControlData(String name, int[] keycodes) {
|
public ControlData(String name, int[] keycodes) {
|
||||||
this(name, keycodes, 0, 0);
|
this(name, keycodes, Tools.currentDisplayMetrics.widthPixels/2, Tools.currentDisplayMetrics.heightPixels/2);
|
||||||
}
|
}
|
||||||
|
|
||||||
public ControlData(String name, int[] keycodes, float x, float y) {
|
public ControlData(String name, int[] keycodes, float x, float y) {
|
||||||
|
@ -1,5 +1,7 @@
|
|||||||
package net.kdt.pojavlaunch.customcontrols;
|
package net.kdt.pojavlaunch.customcontrols;
|
||||||
|
|
||||||
|
import net.kdt.pojavlaunch.Tools;
|
||||||
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.customcontrols.ControlDrawerData.Orientation.DOWN;
|
import static net.kdt.pojavlaunch.customcontrols.ControlDrawerData.Orientation.DOWN;
|
||||||
@ -57,7 +59,7 @@ public class ControlDrawerData {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public ControlDrawerData(ArrayList<ControlData> buttonProperties){
|
public ControlDrawerData(ArrayList<ControlData> buttonProperties){
|
||||||
this(buttonProperties, new ControlData());
|
this(buttonProperties, new ControlData("Drawer", new int[] {}, Tools.currentDisplayMetrics.widthPixels/2, Tools.currentDisplayMetrics.heightPixels/2));
|
||||||
}
|
}
|
||||||
|
|
||||||
public ControlDrawerData(ArrayList<ControlData> buttonProperties, ControlData properties){
|
public ControlDrawerData(ArrayList<ControlData> buttonProperties, ControlData properties){
|
||||||
|
Loading…
x
Reference in New Issue
Block a user