mirror of
https://github.com/AngelAuraMC/Amethyst-Android.git
synced 2025-09-19 01:27:18 -04:00
[custom controls: special buttons] fix it
This commit is contained in:
parent
6fc9420c20
commit
c1358f5f1d
@ -197,12 +197,11 @@ public class BaseMainActivity extends LoggableActivity {
|
|||||||
|
|
||||||
// toggleGui(null);
|
// toggleGui(null);
|
||||||
this.drawerLayout.closeDrawers();
|
this.drawerLayout.closeDrawers();
|
||||||
/*
|
|
||||||
mKeyHandlerView = findViewById(R.id.main_key_handler);
|
mKeyHandlerView = findViewById(R.id.main_key_handler);
|
||||||
mKeyHandlerView.setSingleLine(false);
|
mKeyHandlerView.setSingleLine(false);
|
||||||
mKeyHandlerView.clearFocus();
|
mKeyHandlerView.clearFocus();
|
||||||
mKeyHandlerView.setVisibility(View.GONE);
|
|
||||||
*/
|
|
||||||
AndroidLWJGLKeycode.isBackspaceAfterChar = true; // mVersionInfo.minimumLauncherVersion >= 18;
|
AndroidLWJGLKeycode.isBackspaceAfterChar = true; // mVersionInfo.minimumLauncherVersion >= 18;
|
||||||
|
|
||||||
placeMouseAt(CallbackBridge.windowWidth / 2, CallbackBridge.windowHeight / 2);
|
placeMouseAt(CallbackBridge.windowWidth / 2, CallbackBridge.windowHeight / 2);
|
||||||
|
@ -86,7 +86,10 @@ public class ControlButton extends Button implements OnLongClickListener, OnTouc
|
|||||||
// A non-special button or inside custom controls screen so skip listener
|
// A non-special button or inside custom controls screen so skip listener
|
||||||
} else if (properties.specialButtonListener instanceof View.OnClickListener) {
|
} else if (properties.specialButtonListener instanceof View.OnClickListener) {
|
||||||
setOnClickListener((View.OnClickListener) properties.specialButtonListener);
|
setOnClickListener((View.OnClickListener) properties.specialButtonListener);
|
||||||
|
setOnLongClickListener(null);
|
||||||
|
setOnTouchListener(null);
|
||||||
} else if (properties.specialButtonListener instanceof View.OnTouchListener) {
|
} else if (properties.specialButtonListener instanceof View.OnTouchListener) {
|
||||||
|
setOnLongClickListener(null);
|
||||||
setOnTouchListener((View.OnTouchListener) properties.specialButtonListener);
|
setOnTouchListener((View.OnTouchListener) properties.specialButtonListener);
|
||||||
} else {
|
} else {
|
||||||
throw new IllegalArgumentException("Field " + ControlData.class.getName() + ".specialButtonListener must be View.OnClickListener or View.OnTouchListener, but is " + properties.specialButtonListener.getClass().getName());
|
throw new IllegalArgumentException("Field " + ControlData.class.getName() + ".specialButtonListener must be View.OnClickListener or View.OnTouchListener, but is " + properties.specialButtonListener.getClass().getName());
|
||||||
|
@ -17,12 +17,12 @@
|
|||||||
android:id="@+id/main_control_layout"
|
android:id="@+id/main_control_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
<!--
|
|
||||||
<net.kdt.pojavlaunch.CapturedEditText
|
<net.kdt.pojavlaunch.CapturedEditText
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:id="@+id/main_key_handler"/>
|
android:id="@+id/main_key_handler"/>
|
||||||
-->
|
|
||||||
<net.kdt.pojavlaunch.MinecraftGLView
|
<net.kdt.pojavlaunch.MinecraftGLView
|
||||||
android:id="@+id/main_game_render_view"
|
android:id="@+id/main_game_render_view"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="fill_parent"
|
||||||
|
Loading…
x
Reference in New Issue
Block a user