mirror of
https://github.com/moonlight-stream/moonlight-android.git
synced 2025-07-19 19:13:03 +00:00
Increase usability of on-screen virtual controller (#782)
* Restore resize controls, Make buttons oval * Create new default configuration * Split Configuration Mode into separate Move and Resize modes
This commit is contained in:
parent
bc90cb894c
commit
150bd313cf
@ -1194,8 +1194,9 @@ public class Game extends Activity implements SurfaceHolder.Callback,
|
|||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (virtualController != null &&
|
if (virtualController != null &&
|
||||||
virtualController.getControllerMode() == VirtualController.ControllerMode.Configuration) {
|
virtualController.getControllerMode() == VirtualController.ControllerMode.MoveButtons ||
|
||||||
// Ignore presses when the virtual controller is in configuration mode
|
virtualController.getControllerMode() == VirtualController.ControllerMode.ResizeButtons) {
|
||||||
|
// Ignore presses when the virtual controller is being configured
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -144,13 +144,13 @@ public class DigitalButton extends VirtualControllerElement {
|
|||||||
// set transparent background
|
// set transparent background
|
||||||
canvas.drawColor(Color.TRANSPARENT);
|
canvas.drawColor(Color.TRANSPARENT);
|
||||||
|
|
||||||
paint.setTextSize(getPercent(getWidth(), 30));
|
paint.setTextSize(getPercent(getWidth(), 25));
|
||||||
paint.setTextAlign(Paint.Align.CENTER);
|
paint.setTextAlign(Paint.Align.CENTER);
|
||||||
paint.setStrokeWidth(getDefaultStrokeWidth());
|
paint.setStrokeWidth(getDefaultStrokeWidth());
|
||||||
|
|
||||||
paint.setColor(isPressed() ? pressedColor : getDefaultColor());
|
paint.setColor(isPressed() ? pressedColor : getDefaultColor());
|
||||||
paint.setStyle(Paint.Style.STROKE);
|
paint.setStyle(Paint.Style.STROKE);
|
||||||
canvas.drawRect(paint.getStrokeWidth(), paint.getStrokeWidth(),
|
canvas.drawOval(paint.getStrokeWidth(), paint.getStrokeWidth(),
|
||||||
getWidth() - paint.getStrokeWidth(), getHeight() - paint.getStrokeWidth(), paint);
|
getWidth() - paint.getStrokeWidth(), getHeight() - paint.getStrokeWidth(), paint);
|
||||||
|
|
||||||
if (icon != -1) {
|
if (icon != -1) {
|
||||||
|
@ -34,7 +34,8 @@ public class VirtualController {
|
|||||||
|
|
||||||
public enum ControllerMode {
|
public enum ControllerMode {
|
||||||
Active,
|
Active,
|
||||||
Configuration
|
MoveButtons,
|
||||||
|
ResizeButtons
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final boolean _PRINT_DEBUG_INFORMATION = false;
|
private static final boolean _PRINT_DEBUG_INFORMATION = false;
|
||||||
@ -72,13 +73,16 @@ public class VirtualController {
|
|||||||
public void onClick(View v) {
|
public void onClick(View v) {
|
||||||
String message;
|
String message;
|
||||||
|
|
||||||
if (currentMode == ControllerMode.Configuration) {
|
if (currentMode == ControllerMode.Active){
|
||||||
|
currentMode = ControllerMode.MoveButtons;
|
||||||
|
message = "Entering configuration mode (Move buttons)";
|
||||||
|
} else if (currentMode == ControllerMode.MoveButtons) {
|
||||||
|
currentMode = ControllerMode.ResizeButtons;
|
||||||
|
message = "Entering configuration mode (Resize buttons)";
|
||||||
|
} else {
|
||||||
currentMode = ControllerMode.Active;
|
currentMode = ControllerMode.Active;
|
||||||
VirtualControllerConfigurationLoader.saveProfile(VirtualController.this, context);
|
VirtualControllerConfigurationLoader.saveProfile(VirtualController.this, context);
|
||||||
message = "Exiting configuration mode";
|
message = "Exiting configuration mode";
|
||||||
} else {
|
|
||||||
currentMode = ControllerMode.Configuration;
|
|
||||||
message = "Entering configuration mode";
|
|
||||||
}
|
}
|
||||||
|
|
||||||
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
|
Toast.makeText(context, message, Toast.LENGTH_SHORT).show();
|
||||||
@ -90,6 +94,7 @@ public class VirtualController {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hide() {
|
public void hide() {
|
||||||
|
@ -24,6 +24,11 @@ public class VirtualControllerConfigurationLoader {
|
|||||||
return (int) (((float) total / (float) 100) * (float) percent);
|
return (int) (((float) total / (float) 100) * (float) percent);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// The default controls are specified using a grid of 128*72 cells at 16:9
|
||||||
|
private static int screenScale(int units, int height) {
|
||||||
|
return (int) (((float) height / (float) 72) * (float) units);
|
||||||
|
}
|
||||||
|
|
||||||
private static DigitalPad createDigitalPad(
|
private static DigitalPad createDigitalPad(
|
||||||
final VirtualController controller,
|
final VirtualController controller,
|
||||||
final Context context) {
|
final Context context) {
|
||||||
@ -145,147 +150,176 @@ public class VirtualControllerConfigurationLoader {
|
|||||||
return new RightAnalogStick(controller, context);
|
return new RightAnalogStick(controller, context);
|
||||||
}
|
}
|
||||||
|
|
||||||
private static final int BUTTON_BASE_X = 65;
|
|
||||||
private static final int BUTTON_BASE_Y = 5;
|
private static final int TRIGGER_L_BASE_X = 1;
|
||||||
private static final int BUTTON_WIDTH = getPercent(30, 33);
|
private static final int TRIGGER_R_BASE_X = 92;
|
||||||
private static final int BUTTON_HEIGHT = getPercent(40, 33);
|
private static final int TRIGGER_DISTANCE = 23;
|
||||||
|
private static final int TRIGGER_BASE_Y = 31;
|
||||||
|
private static final int TRIGGER_WIDTH = 12;
|
||||||
|
private static final int TRIGGER_HEIGHT = 9;
|
||||||
|
|
||||||
|
// Face buttons are defined based on the Y button (button number 9)
|
||||||
|
private static final int BUTTON_BASE_X = 106;
|
||||||
|
private static final int BUTTON_BASE_Y = 1;
|
||||||
|
private static final int BUTTON_SIZE = 10;
|
||||||
|
|
||||||
|
private static final int DPAD_BASE_X = 4;
|
||||||
|
private static final int DPAD_BASE_Y = 41;
|
||||||
|
private static final int DPAD_SIZE = 30;
|
||||||
|
|
||||||
|
private static final int ANALOG_L_BASE_X = 4;
|
||||||
|
private static final int ANALOG_L_BASE_Y = 1;
|
||||||
|
private static final int ANALOG_R_BASE_X = 96;
|
||||||
|
private static final int ANALOG_R_BASE_Y = 42;
|
||||||
|
private static final int ANALOG_SIZE = 28;
|
||||||
|
|
||||||
|
private static final int START_X = 83;
|
||||||
|
private static final int BACK_X = 34;
|
||||||
|
private static final int START_BACK_Y = 64;
|
||||||
|
private static final int START_BACK_WIDTH = 12;
|
||||||
|
private static final int START_BACK_HEIGHT = 7;
|
||||||
|
|
||||||
public static void createDefaultLayout(final VirtualController controller, final Context context) {
|
public static void createDefaultLayout(final VirtualController controller, final Context context) {
|
||||||
|
|
||||||
DisplayMetrics screen = context.getResources().getDisplayMetrics();
|
DisplayMetrics screen = context.getResources().getDisplayMetrics();
|
||||||
PreferenceConfiguration config = PreferenceConfiguration.readPreferences(context);
|
PreferenceConfiguration config = PreferenceConfiguration.readPreferences(context);
|
||||||
|
|
||||||
|
// Displace controls on the right by this amount of pixels to account for different aspect ratios
|
||||||
|
int rightDisplacement = screen.widthPixels - screen.heightPixels * 16 / 9;
|
||||||
|
|
||||||
|
int height = screen.heightPixels;
|
||||||
|
|
||||||
// NOTE: Some of these getPercent() expressions seem like they can be combined
|
// NOTE: Some of these getPercent() expressions seem like they can be combined
|
||||||
// into a single call. Due to floating point rounding, this isn't actually possible.
|
// into a single call. Due to floating point rounding, this isn't actually possible.
|
||||||
|
|
||||||
if (!config.onlyL3R3)
|
if (!config.onlyL3R3)
|
||||||
{
|
{
|
||||||
controller.addElement(createDigitalPad(controller, context),
|
controller.addElement(createDigitalPad(controller, context),
|
||||||
getPercent(5, screen.widthPixels),
|
screenScale(DPAD_BASE_X, height),
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels),
|
screenScale(DPAD_BASE_Y, height),
|
||||||
getPercent(30, screen.widthPixels),
|
screenScale(DPAD_SIZE, height),
|
||||||
getPercent(40, screen.heightPixels)
|
screenScale(DPAD_SIZE, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_A,
|
VirtualControllerElement.EID_A,
|
||||||
ControllerPacket.A_FLAG, 0, 1, "A", -1, controller, context),
|
ControllerPacket.A_FLAG, 0, 1, "A", -1, controller, context),
|
||||||
getPercent(BUTTON_BASE_X, screen.widthPixels) + getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(BUTTON_BASE_X, height) + rightDisplacement,
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels) + 2 * getPercent(BUTTON_HEIGHT, screen.heightPixels),
|
screenScale(BUTTON_BASE_Y + 2 * BUTTON_SIZE, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(BUTTON_SIZE, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(BUTTON_SIZE, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_B,
|
VirtualControllerElement.EID_B,
|
||||||
ControllerPacket.B_FLAG, 0, 1, "B", -1, controller, context),
|
ControllerPacket.B_FLAG, 0, 1, "B", -1, controller, context),
|
||||||
getPercent(BUTTON_BASE_X, screen.widthPixels) + 2 * getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(BUTTON_BASE_X + BUTTON_SIZE, height) + rightDisplacement,
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels) + getPercent(BUTTON_HEIGHT, screen.heightPixels),
|
screenScale(BUTTON_BASE_Y + BUTTON_SIZE, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(BUTTON_SIZE, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(BUTTON_SIZE, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_X,
|
VirtualControllerElement.EID_X,
|
||||||
ControllerPacket.X_FLAG, 0, 1, "X", -1, controller, context),
|
ControllerPacket.X_FLAG, 0, 1, "X", -1, controller, context),
|
||||||
getPercent(BUTTON_BASE_X, screen.widthPixels),
|
screenScale(BUTTON_BASE_X - BUTTON_SIZE, height) + rightDisplacement,
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels) + getPercent(BUTTON_HEIGHT, screen.heightPixels),
|
screenScale(BUTTON_BASE_Y + BUTTON_SIZE, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(BUTTON_SIZE, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(BUTTON_SIZE, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_Y,
|
VirtualControllerElement.EID_Y,
|
||||||
ControllerPacket.Y_FLAG, 0, 1, "Y", -1, controller, context),
|
ControllerPacket.Y_FLAG, 0, 1, "Y", -1, controller, context),
|
||||||
getPercent(BUTTON_BASE_X, screen.widthPixels) + getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(BUTTON_BASE_X, height) + rightDisplacement,
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels),
|
screenScale(BUTTON_BASE_Y, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(BUTTON_SIZE, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(BUTTON_SIZE, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createLeftTrigger(
|
controller.addElement(createLeftTrigger(
|
||||||
0, "LT", -1, controller, context),
|
0, "LT", -1, controller, context),
|
||||||
getPercent(BUTTON_BASE_X, screen.widthPixels),
|
screenScale(TRIGGER_L_BASE_X, height),
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels),
|
screenScale(TRIGGER_BASE_Y, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(TRIGGER_WIDTH, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(TRIGGER_HEIGHT, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createRightTrigger(
|
controller.addElement(createRightTrigger(
|
||||||
0, "RT", -1, controller, context),
|
0, "RT", -1, controller, context),
|
||||||
getPercent(BUTTON_BASE_X, screen.widthPixels) + 2 * getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(TRIGGER_R_BASE_X + TRIGGER_DISTANCE, height) + rightDisplacement,
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels),
|
screenScale(TRIGGER_BASE_Y, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(TRIGGER_WIDTH, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(TRIGGER_HEIGHT, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_LB,
|
VirtualControllerElement.EID_LB,
|
||||||
ControllerPacket.LB_FLAG, 0, 1, "LB", -1, controller, context),
|
ControllerPacket.LB_FLAG, 0, 1, "LB", -1, controller, context),
|
||||||
getPercent(BUTTON_BASE_X, screen.widthPixels),
|
screenScale(TRIGGER_L_BASE_X + TRIGGER_DISTANCE, height),
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels) + 2 * getPercent(BUTTON_HEIGHT, screen.heightPixels),
|
screenScale(TRIGGER_BASE_Y, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(TRIGGER_WIDTH, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(TRIGGER_HEIGHT, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_RB,
|
VirtualControllerElement.EID_RB,
|
||||||
ControllerPacket.RB_FLAG, 0, 1, "RB", -1, controller, context),
|
ControllerPacket.RB_FLAG, 0, 1, "RB", -1, controller, context),
|
||||||
getPercent(BUTTON_BASE_X, screen.widthPixels) + 2 * getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(TRIGGER_R_BASE_X, height) + rightDisplacement,
|
||||||
getPercent(BUTTON_BASE_Y, screen.heightPixels) + 2 * getPercent(BUTTON_HEIGHT, screen.heightPixels),
|
screenScale(TRIGGER_BASE_Y, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(TRIGGER_WIDTH, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(TRIGGER_HEIGHT, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createLeftStick(controller, context),
|
controller.addElement(createLeftStick(controller, context),
|
||||||
getPercent(5, screen.widthPixels),
|
screenScale(ANALOG_L_BASE_X, height),
|
||||||
getPercent(50, screen.heightPixels),
|
screenScale(ANALOG_L_BASE_Y, height),
|
||||||
getPercent(40, screen.widthPixels),
|
screenScale(ANALOG_SIZE, height),
|
||||||
getPercent(50, screen.heightPixels)
|
screenScale(ANALOG_SIZE, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createRightStick(controller, context),
|
controller.addElement(createRightStick(controller, context),
|
||||||
getPercent(55, screen.widthPixels),
|
screenScale(ANALOG_R_BASE_X, height) + rightDisplacement,
|
||||||
getPercent(50, screen.heightPixels),
|
screenScale(ANALOG_R_BASE_Y, height),
|
||||||
getPercent(40, screen.widthPixels),
|
screenScale(ANALOG_SIZE, height),
|
||||||
getPercent(50, screen.heightPixels)
|
screenScale(ANALOG_SIZE, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_BACK,
|
VirtualControllerElement.EID_BACK,
|
||||||
ControllerPacket.BACK_FLAG, 0, 2, "BACK", -1, controller, context),
|
ControllerPacket.BACK_FLAG, 0, 2, "BACK", -1, controller, context),
|
||||||
getPercent(40, screen.widthPixels),
|
screenScale(BACK_X, height),
|
||||||
getPercent(90, screen.heightPixels),
|
screenScale(START_BACK_Y, height),
|
||||||
getPercent(10, screen.widthPixels),
|
screenScale(START_BACK_WIDTH, height),
|
||||||
getPercent(10, screen.heightPixels)
|
screenScale(START_BACK_HEIGHT, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_START,
|
VirtualControllerElement.EID_START,
|
||||||
ControllerPacket.PLAY_FLAG, 0, 3, "START", -1, controller, context),
|
ControllerPacket.PLAY_FLAG, 0, 3, "START", -1, controller, context),
|
||||||
getPercent(40, screen.widthPixels) + getPercent(10, screen.widthPixels),
|
screenScale(START_X, height) + rightDisplacement,
|
||||||
getPercent(90, screen.heightPixels),
|
screenScale(START_BACK_Y, height),
|
||||||
getPercent(10, screen.widthPixels),
|
screenScale(START_BACK_WIDTH, height),
|
||||||
getPercent(10, screen.heightPixels)
|
screenScale(START_BACK_HEIGHT, height)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_LSB,
|
VirtualControllerElement.EID_LSB,
|
||||||
ControllerPacket.LS_CLK_FLAG, 0, 1, "L3", -1, controller, context),
|
ControllerPacket.LS_CLK_FLAG, 0, 1, "L3", -1, controller, context),
|
||||||
getPercent(2, screen.widthPixels),
|
screenScale(TRIGGER_L_BASE_X, height),
|
||||||
getPercent(80, screen.heightPixels),
|
screenScale(TRIGGER_BASE_Y, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(TRIGGER_WIDTH, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(TRIGGER_HEIGHT, height)
|
||||||
);
|
);
|
||||||
|
|
||||||
controller.addElement(createDigitalButton(
|
controller.addElement(createDigitalButton(
|
||||||
VirtualControllerElement.EID_RSB,
|
VirtualControllerElement.EID_RSB,
|
||||||
ControllerPacket.RS_CLK_FLAG, 0, 1, "R3", -1, controller, context),
|
ControllerPacket.RS_CLK_FLAG, 0, 1, "R3", -1, controller, context),
|
||||||
getPercent(89, screen.widthPixels),
|
screenScale(TRIGGER_R_BASE_X + TRIGGER_DISTANCE, height),
|
||||||
getPercent(80, screen.heightPixels),
|
screenScale(TRIGGER_BASE_Y, height),
|
||||||
getPercent(BUTTON_WIDTH, screen.widthPixels),
|
screenScale(TRIGGER_WIDTH, height),
|
||||||
getPercent(BUTTON_HEIGHT, screen.heightPixels)
|
screenScale(TRIGGER_HEIGHT, height)
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -43,7 +43,8 @@ public abstract class VirtualControllerElement extends View {
|
|||||||
|
|
||||||
private int normalColor = 0xF0888888;
|
private int normalColor = 0xF0888888;
|
||||||
protected int pressedColor = 0xF00000FF;
|
protected int pressedColor = 0xF00000FF;
|
||||||
private int configNormalColor = 0xF0FF0000;
|
private int configMoveColor = 0xF0FF0000;
|
||||||
|
private int configResizeColor = 0xF0FF00FF;
|
||||||
private int configSelectedColor = 0xF000FF00;
|
private int configSelectedColor = 0xF000FF00;
|
||||||
|
|
||||||
protected int startSize_x;
|
protected int startSize_x;
|
||||||
@ -156,8 +157,12 @@ public abstract class VirtualControllerElement extends View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
protected int getDefaultColor() {
|
protected int getDefaultColor() {
|
||||||
return (virtualController.getControllerMode() == VirtualController.ControllerMode.Configuration) ?
|
if (virtualController.getControllerMode() == VirtualController.ControllerMode.MoveButtons)
|
||||||
configNormalColor : normalColor;
|
return configMoveColor;
|
||||||
|
else if (virtualController.getControllerMode() == VirtualController.ControllerMode.ResizeButtons)
|
||||||
|
return configResizeColor;
|
||||||
|
else
|
||||||
|
return normalColor;
|
||||||
}
|
}
|
||||||
|
|
||||||
protected int getDefaultStrokeWidth() {
|
protected int getDefaultStrokeWidth() {
|
||||||
@ -230,7 +235,10 @@ public abstract class VirtualControllerElement extends View {
|
|||||||
startSize_x = getWidth();
|
startSize_x = getWidth();
|
||||||
startSize_y = getHeight();
|
startSize_y = getHeight();
|
||||||
|
|
||||||
actionEnableMove();
|
if (virtualController.getControllerMode() == VirtualController.ControllerMode.MoveButtons)
|
||||||
|
actionEnableMove();
|
||||||
|
else if (virtualController.getControllerMode() == VirtualController.ControllerMode.ResizeButtons)
|
||||||
|
actionEnableResize();
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user