mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 05:20:14 -07:00
[Input pipe] Use EditText to handle input events, with support input unicodes
This commit is contained in:
parent
cc47a72bc2
commit
ae50740ff4
10 changed files with 251 additions and 712 deletions
|
|
@ -63,13 +63,6 @@
|
||||||
android:name=".MainActivity"
|
android:name=".MainActivity"
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation"/>
|
android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation"/>
|
||||||
|
|
||||||
<activity
|
|
||||||
android:launchMode="standard"
|
|
||||||
android:multiprocess="true"
|
|
||||||
android:screenOrientation="sensorLandscape"
|
|
||||||
android:name=".CustomCtrlMainActivity"
|
|
||||||
android:configChanges="keyboardHidden|orientation|screenSize|keyboard|navigation"/>
|
|
||||||
|
|
||||||
<activity
|
<activity
|
||||||
android:screenOrientation="sensorLandscape"
|
android:screenOrientation="sensorLandscape"
|
||||||
android:name=".prefs.LauncherPreferenceActivity"
|
android:name=".prefs.LauncherPreferenceActivity"
|
||||||
|
|
|
||||||
|
|
@ -172,16 +172,18 @@ public class ActionPopupWindow extends PinnedPopupWindow implements OnClickListe
|
||||||
errorAt = null;
|
errorAt = null;
|
||||||
*/
|
*/
|
||||||
|
|
||||||
int errorAt = 0;
|
if (properties.isDynamicBtn) {
|
||||||
try {
|
int errorAt = 0;
|
||||||
properties.insertDynamicPos(editDynamicX.getText().toString());
|
try {
|
||||||
errorAt = 1;
|
properties.insertDynamicPos(editDynamicX.getText().toString());
|
||||||
properties.insertDynamicPos(editDynamicY.getText().toString());
|
errorAt = 1;
|
||||||
} catch (Throwable th) {
|
properties.insertDynamicPos(editDynamicY.getText().toString());
|
||||||
(errorAt == 0 ? editDynamicX : editDynamicY)
|
} catch (Throwable th) {
|
||||||
.setError(th.getMessage());
|
(errorAt == 0 ? editDynamicX : editDynamicY)
|
||||||
|
.setError(th.getMessage());
|
||||||
|
|
||||||
return;
|
return;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
if (spinnerKeycode.getSelectedItemPosition() < specialArr.length) {
|
if (spinnerKeycode.getSelectedItemPosition() < specialArr.length) {
|
||||||
|
|
|
||||||
|
|
@ -168,14 +168,14 @@ public class AndroidLWJGLKeycode {
|
||||||
return androidKeyNameArray;
|
return androidKeyNameArray;
|
||||||
}
|
}
|
||||||
|
|
||||||
public static void execKey(BaseMainActivity mainActivity, KeyEvent keyEvent, int i, boolean isDown) {
|
public static void execKey(KeyEvent keyEvent, int i, boolean isDown) {
|
||||||
for (Map.Entry<Integer, Integer> perKey : androidToLwjglMap.entrySet()) {
|
for (Map.Entry<Integer, Integer> perKey : androidToLwjglMap.entrySet()) {
|
||||||
if (i == 1 && (keyEvent.getSource() == InputDevice.SOURCE_MOUSE)) {
|
if (i == 1 && (keyEvent.getSource() == InputDevice.SOURCE_MOUSE)) {
|
||||||
// Right mouse detection
|
// Right mouse detection
|
||||||
mainActivity.sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, true);
|
BaseMainActivity.sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, isDown);
|
||||||
mainActivity.sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, false);
|
// BaseMainActivity.sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, false);
|
||||||
} else if (perKey.getKey() == i) {
|
} else if (perKey.getKey() == i) {
|
||||||
mainActivity.sendKeyPress(perKey.getValue(), keyEvent.getModifiers(), isDown);
|
BaseMainActivity.sendKeyPress(perKey.getValue(), keyEvent.getModifiers(), isDown);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -196,14 +196,14 @@ public class AndroidLWJGLKeycode {
|
||||||
|
|
||||||
try {
|
try {
|
||||||
if ((int) keyEvent.getDisplayLabel() != KeyEvent.KEYCODE_UNKNOWN && !CallbackBridge.isGrabbing()) {
|
if ((int) keyEvent.getDisplayLabel() != KeyEvent.KEYCODE_UNKNOWN && !CallbackBridge.isGrabbing()) {
|
||||||
mainActivity.sendKeyPress(androidToLwjglMap.get(keyEvent.getKeyCode()), (char) keyEvent.getUnicodeChar(), keyEvent.getScanCode(), mods, isDown);
|
BaseMainActivity.sendKeyPress(androidToLwjglMap.get(keyEvent.getKeyCode()), (char) keyEvent.getUnicodeChar(), keyEvent.getScanCode(), mods, isDown);
|
||||||
}
|
}
|
||||||
} catch (Throwable th) {
|
} catch (Throwable th) {
|
||||||
th.printStackTrace();
|
th.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
if (isBackspaceAfterChar && (int) keyEvent.getDisplayLabel() != KeyEvent.KEYCODE_UNKNOWN && !CallbackBridge.isGrabbing() && i != KeyEvent.KEYCODE_DEL) {
|
if (isBackspaceAfterChar && (int) keyEvent.getDisplayLabel() != KeyEvent.KEYCODE_UNKNOWN && !CallbackBridge.isGrabbing() && i != KeyEvent.KEYCODE_DEL) {
|
||||||
mainActivity.sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_BACKSPACE, 0, isDown);
|
BaseMainActivity.sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_BACKSPACE, 0, isDown);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -74,6 +74,8 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
private DrawerLayout drawerLayout;
|
private DrawerLayout drawerLayout;
|
||||||
private NavigationView navDrawer;
|
private NavigationView navDrawer;
|
||||||
|
|
||||||
|
private CapturedEditText mKeyHandlerView;
|
||||||
|
|
||||||
private LinearLayout contentLog;
|
private LinearLayout contentLog;
|
||||||
private TextView textLog;
|
private TextView textLog;
|
||||||
private ScrollView contentScroll;
|
private ScrollView contentScroll;
|
||||||
|
|
@ -196,6 +198,11 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
// toggleGui(null);
|
// toggleGui(null);
|
||||||
this.drawerLayout.closeDrawers();
|
this.drawerLayout.closeDrawers();
|
||||||
|
|
||||||
|
mKeyHandlerView = findViewById(R.id.main_key_handler);
|
||||||
|
mKeyHandlerView.setFocusable(true);
|
||||||
|
mKeyHandlerView.setFocusableInTouchMode(true);
|
||||||
|
mKeyHandlerView.requestFocus();
|
||||||
|
|
||||||
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);
|
||||||
|
|
@ -712,50 +719,6 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
Tools.showError(this, e, true);
|
Tools.showError(this, e, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
// Mirror video of OpenGL view.
|
|
||||||
/*
|
|
||||||
new Thread(new Runnable(){
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
try {
|
|
||||||
while (true) {
|
|
||||||
if (bit == null) continue;
|
|
||||||
runOnUiThread(new Runnable(){
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void run()
|
|
||||||
{
|
|
||||||
fillCanvasGL();
|
|
||||||
mirrorView.setImageBitmap(bit);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
// ~33fps render
|
|
||||||
Thread.sleep(30);
|
|
||||||
}
|
|
||||||
} catch (Throwable th) {
|
|
||||||
th.printStackTrace();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}).start();
|
|
||||||
*/
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onKeyUp(int keyCode, KeyEvent event)
|
|
||||||
{
|
|
||||||
AndroidLWJGLKeycode.execKey(this, event, keyCode, false);
|
|
||||||
return super.onKeyUp(keyCode, event);
|
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public boolean onKeyDown(int keyCode, KeyEvent event)
|
|
||||||
{
|
|
||||||
AndroidLWJGLKeycode.execKey(this, event, keyCode, true);
|
|
||||||
return super.onKeyDown(keyCode, event);
|
|
||||||
}
|
}
|
||||||
|
|
||||||
//private Dialog menuDial;
|
//private Dialog menuDial;
|
||||||
|
|
@ -1042,6 +1005,8 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
public void onBackPressed() {
|
public void onBackPressed() {
|
||||||
// Prevent back
|
// Prevent back
|
||||||
// Catch back as Esc keycode at another place
|
// Catch back as Esc keycode at another place
|
||||||
|
|
||||||
|
// sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_ESCAPE);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hideKeyboard() {
|
public void hideKeyboard() {
|
||||||
|
|
@ -1086,8 +1051,8 @@ public class BaseMainActivity extends LoggableActivity {
|
||||||
sendKeyPress(keyCode, 0, false);
|
sendKeyPress(keyCode, 0, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
private boolean isLeftMouseDown, isRightMouseDown;
|
private static boolean isLeftMouseDown, isRightMouseDown;
|
||||||
public void sendMouseButton(int button, boolean status) {
|
public static void sendMouseButton(int button, boolean status) {
|
||||||
// TODO implement this method!!!
|
// TODO implement this method!!!
|
||||||
// CallbackBridge.setMouseButtonInGrabMode((byte) button, status ? (byte) 1 : (byte) 0);
|
// CallbackBridge.setMouseButtonInGrabMode((byte) button, status ? (byte) 1 : (byte) 0);
|
||||||
// or
|
// or
|
||||||
|
|
|
||||||
29
app/src/main/java/net/kdt/pojavlaunch/CapturedEditText.java
Normal file
29
app/src/main/java/net/kdt/pojavlaunch/CapturedEditText.java
Normal file
|
|
@ -0,0 +1,29 @@
|
||||||
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
|
import android.content.*;
|
||||||
|
import android.util.*;
|
||||||
|
import android.widget.*;
|
||||||
|
import android.view.*;
|
||||||
|
|
||||||
|
public class CapturedEditText extends EditText
|
||||||
|
{
|
||||||
|
public CapturedEditText(Context ctx) {
|
||||||
|
this(ctx, null);
|
||||||
|
}
|
||||||
|
|
||||||
|
public CapturedEditText(Context ctx, AttributeSet attrs) {
|
||||||
|
super(ctx, attrs);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onKeyDown(int keyCode, KeyEvent event) {
|
||||||
|
AndroidLWJGLKeycode.execKey(event, keyCode, true);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean onKeyUp(int keyCode, KeyEvent event) {
|
||||||
|
AndroidLWJGLKeycode.execKey(event, keyCode, false);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -1,113 +0,0 @@
|
||||||
package net.kdt.pojavlaunch;
|
|
||||||
|
|
||||||
import android.os.*;
|
|
||||||
import android.view.*;
|
|
||||||
import android.view.View.*;
|
|
||||||
import android.widget.*;
|
|
||||||
import net.kdt.pojavlaunch.customcontrols.*;
|
|
||||||
import net.kdt.pojavlaunch.prefs.*;
|
|
||||||
import org.lwjgl.glfw.*;
|
|
||||||
import java.io.*;
|
|
||||||
import com.google.gson.*;
|
|
||||||
|
|
||||||
public class CustomCtrlMainActivity extends BaseMainActivity {
|
|
||||||
private ControlLayout mControlLayout;
|
|
||||||
|
|
||||||
private View.OnClickListener mClickListener;
|
|
||||||
private View.OnTouchListener mTouchListener;
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
|
||||||
super.onCreate(savedInstanceState);
|
|
||||||
initLayout(R.layout.main_with_customctrl);
|
|
||||||
|
|
||||||
mClickListener = new View.OnClickListener(){
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
if (view instanceof ControlButton) {
|
|
||||||
ControlButton button = (ControlButton) view;
|
|
||||||
switch (button.getProperties().keycode) {
|
|
||||||
case ControlData.SPECIALBTN_KEYBOARD:
|
|
||||||
showKeyboard();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ControlData.SPECIALBTN_TOGGLECTRL:
|
|
||||||
mControlLayout.toggleControlVisible();
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ControlData.SPECIALBTN_VIRTUALMOUSE:
|
|
||||||
toggleMouse(button);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
mTouchListener = new View.OnTouchListener(){
|
|
||||||
@Override
|
|
||||||
public boolean onTouch(View view, MotionEvent e) {
|
|
||||||
boolean isDown;
|
|
||||||
switch (e.getActionMasked()) {
|
|
||||||
case MotionEvent.ACTION_DOWN: // 0
|
|
||||||
case MotionEvent.ACTION_POINTER_DOWN: // 5
|
|
||||||
isDown = true;
|
|
||||||
break;
|
|
||||||
case MotionEvent.ACTION_UP: // 1
|
|
||||||
case MotionEvent.ACTION_CANCEL: // 3
|
|
||||||
case MotionEvent.ACTION_POINTER_UP: // 6
|
|
||||||
isDown = false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
if (view instanceof ControlButton) {
|
|
||||||
ControlButton button = (ControlButton) view;
|
|
||||||
switch (button.getProperties().keycode) {
|
|
||||||
case ControlData.SPECIALBTN_MOUSEPRI:
|
|
||||||
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_LEFT, isDown);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ControlData.SPECIALBTN_MOUSEMID:
|
|
||||||
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_MIDDLE, isDown);
|
|
||||||
break;
|
|
||||||
|
|
||||||
case ControlData.SPECIALBTN_MOUSESEC:
|
|
||||||
if (CallbackBridge.isGrabbing()) {
|
|
||||||
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, isDown);
|
|
||||||
} else {
|
|
||||||
CallbackBridge.putMouseEventWithCoords(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, isDown ? 1 : 0, CallbackBridge.mouseX, CallbackBridge.mouseY);
|
|
||||||
|
|
||||||
setRightOverride(isDown);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
};
|
|
||||||
|
|
||||||
ControlData[] specialButtons = ControlData.getSpecialButtons();
|
|
||||||
specialButtons[0].specialButtonListener
|
|
||||||
= specialButtons[1].specialButtonListener
|
|
||||||
= specialButtons[4].specialButtonListener
|
|
||||||
= mClickListener;
|
|
||||||
|
|
||||||
specialButtons[2].specialButtonListener
|
|
||||||
= specialButtons[3].specialButtonListener
|
|
||||||
= specialButtons[5].specialButtonListener
|
|
||||||
= mTouchListener;
|
|
||||||
|
|
||||||
mControlLayout = findViewById(R.id.main_control_layout);
|
|
||||||
mControlLayout.setModifiable(false);
|
|
||||||
try {
|
|
||||||
mControlLayout.loadLayout(LauncherPreferences.PREF_DEFAULTCTRL_PATH);
|
|
||||||
} catch (Throwable th) {
|
|
||||||
Tools.showError(this, th);
|
|
||||||
}
|
|
||||||
|
|
||||||
// toggleGui(null);
|
|
||||||
mControlLayout.toggleControlVisible();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
@ -7,131 +7,107 @@ import android.widget.*;
|
||||||
import net.kdt.pojavlaunch.customcontrols.*;
|
import net.kdt.pojavlaunch.customcontrols.*;
|
||||||
import net.kdt.pojavlaunch.prefs.*;
|
import net.kdt.pojavlaunch.prefs.*;
|
||||||
import org.lwjgl.glfw.*;
|
import org.lwjgl.glfw.*;
|
||||||
|
import java.io.*;
|
||||||
|
import com.google.gson.*;
|
||||||
|
|
||||||
public class MainActivity extends BaseMainActivity implements OnClickListener, OnTouchListener {
|
public class MainActivity extends BaseMainActivity {
|
||||||
private Button upButton,
|
private ControlLayout mControlLayout;
|
||||||
downButton, leftButton,
|
|
||||||
rightButton, jumpButton,
|
|
||||||
primaryButton, secondaryButton,
|
|
||||||
debugButton, shiftButton,
|
|
||||||
keyboardButton, inventoryButton,
|
|
||||||
talkButton, thirdPersonButton,
|
|
||||||
zoomButton, listPlayersButton,
|
|
||||||
toggleControlButton;
|
|
||||||
|
|
||||||
private Button[] controlButtons;
|
private View.OnClickListener mClickListener;
|
||||||
|
private View.OnTouchListener mTouchListener;
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onCreate(Bundle savedInstanceState) {
|
public void onCreate(Bundle savedInstanceState) {
|
||||||
super.onCreate(savedInstanceState);
|
super.onCreate(savedInstanceState);
|
||||||
initLayout(R.layout.main);
|
initLayout(R.layout.main_with_customctrl);
|
||||||
|
|
||||||
this.upButton = findButton(R.id.control_up);
|
mClickListener = new View.OnClickListener(){
|
||||||
this.downButton = findButton(R.id.control_down);
|
@Override
|
||||||
this.leftButton = findButton(R.id.control_left);
|
public void onClick(View view) {
|
||||||
this.rightButton = findButton(R.id.control_right);
|
if (view instanceof ControlButton) {
|
||||||
this.jumpButton = findButton(R.id.control_jump);
|
ControlButton button = (ControlButton) view;
|
||||||
this.primaryButton = findButton(R.id.control_primary);
|
switch (button.getProperties().keycode) {
|
||||||
this.secondaryButton = findButton(R.id.control_secondary);
|
case ControlData.SPECIALBTN_KEYBOARD:
|
||||||
this.debugButton = findButton(R.id.control_debug);
|
showKeyboard();
|
||||||
this.shiftButton = findButton(R.id.control_shift);
|
break;
|
||||||
this.keyboardButton = findButton(R.id.control_keyboard);
|
|
||||||
this.inventoryButton = findButton(R.id.control_inventory);
|
case ControlData.SPECIALBTN_TOGGLECTRL:
|
||||||
this.talkButton = findButton(R.id.control_talk);
|
mControlLayout.toggleControlVisible();
|
||||||
this.thirdPersonButton = findButton(R.id.control_thirdperson);
|
break;
|
||||||
this.zoomButton = findButton(R.id.control_zoom);
|
|
||||||
this.listPlayersButton = findButton(R.id.control_listplayers);
|
case ControlData.SPECIALBTN_VIRTUALMOUSE:
|
||||||
this.toggleControlButton = findButton(R.id.control_togglecontrol);
|
toggleMouse(button);
|
||||||
this.controlButtons = new Button[]{
|
break;
|
||||||
upButton, downButton, leftButton, rightButton,
|
}
|
||||||
jumpButton, primaryButton, secondaryButton,
|
}
|
||||||
debugButton, shiftButton, keyboardButton,
|
}
|
||||||
inventoryButton, talkButton, thirdPersonButton,
|
|
||||||
listPlayersButton
|
|
||||||
};
|
};
|
||||||
this.toggleControlButton.setOnClickListener(this);
|
|
||||||
this.zoomButton.setVisibility(mVersionInfo.optifineLib == null ? View.GONE : View.VISIBLE);
|
mTouchListener = new View.OnTouchListener(){
|
||||||
|
@Override
|
||||||
|
public boolean onTouch(View view, MotionEvent e) {
|
||||||
|
boolean isDown;
|
||||||
|
switch (e.getActionMasked()) {
|
||||||
|
case MotionEvent.ACTION_DOWN: // 0
|
||||||
|
case MotionEvent.ACTION_POINTER_DOWN: // 5
|
||||||
|
isDown = true;
|
||||||
|
break;
|
||||||
|
case MotionEvent.ACTION_UP: // 1
|
||||||
|
case MotionEvent.ACTION_CANCEL: // 3
|
||||||
|
case MotionEvent.ACTION_POINTER_UP: // 6
|
||||||
|
isDown = false;
|
||||||
|
break;
|
||||||
|
default:
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
|
||||||
|
if (view instanceof ControlButton) {
|
||||||
|
ControlButton button = (ControlButton) view;
|
||||||
|
switch (button.getProperties().keycode) {
|
||||||
|
case ControlData.SPECIALBTN_MOUSEPRI:
|
||||||
|
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_LEFT, isDown);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ControlData.SPECIALBTN_MOUSEMID:
|
||||||
|
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_MIDDLE, isDown);
|
||||||
|
break;
|
||||||
|
|
||||||
|
case ControlData.SPECIALBTN_MOUSESEC:
|
||||||
|
if (CallbackBridge.isGrabbing()) {
|
||||||
|
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, isDown);
|
||||||
|
} else {
|
||||||
|
CallbackBridge.putMouseEventWithCoords(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, isDown ? 1 : 0, CallbackBridge.mouseX, CallbackBridge.mouseY);
|
||||||
|
|
||||||
|
setRightOverride(isDown);
|
||||||
|
}
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
ControlData[] specialButtons = ControlData.getSpecialButtons();
|
||||||
|
specialButtons[0].specialButtonListener
|
||||||
|
= specialButtons[1].specialButtonListener
|
||||||
|
= specialButtons[4].specialButtonListener
|
||||||
|
= mClickListener;
|
||||||
|
|
||||||
|
specialButtons[2].specialButtonListener
|
||||||
|
= specialButtons[3].specialButtonListener
|
||||||
|
= specialButtons[5].specialButtonListener
|
||||||
|
= mTouchListener;
|
||||||
|
|
||||||
|
mControlLayout = findViewById(R.id.main_control_layout);
|
||||||
|
mControlLayout.setModifiable(false);
|
||||||
|
try {
|
||||||
|
mControlLayout.loadLayout(LauncherPreferences.PREF_DEFAULTCTRL_PATH);
|
||||||
|
} catch (Throwable th) {
|
||||||
|
Tools.showError(this, th);
|
||||||
|
}
|
||||||
|
|
||||||
// toggleGui(null);
|
// toggleGui(null);
|
||||||
onClick(toggleControlButton);
|
mControlLayout.toggleControlVisible();
|
||||||
}
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onClick(View view) {
|
|
||||||
switch (view.getId()) {
|
|
||||||
case R.id.control_togglecontrol: {
|
|
||||||
/*
|
|
||||||
switch(overlayView.getVisibility()){
|
|
||||||
case View.VISIBLE: overlayView.setVisibility(View.GONE);
|
|
||||||
break;
|
|
||||||
case View.GONE: overlayView.setVisibility(View.VISIBLE);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
for (Button button : controlButtons) {
|
|
||||||
button.setVisibility(button.getVisibility() == View.GONE ? View.VISIBLE : View.GONE);
|
|
||||||
}
|
|
||||||
|
|
||||||
zoomButton.setVisibility((zoomButton.getVisibility() == View.GONE && mVersionInfo.optifineLib != null) ? View.VISIBLE : View.GONE);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
public boolean onTouch(View v, MotionEvent e) {
|
|
||||||
boolean isDown;
|
|
||||||
switch (e.getActionMasked()) {
|
|
||||||
case MotionEvent.ACTION_DOWN: // 0
|
|
||||||
case MotionEvent.ACTION_POINTER_DOWN: // 5
|
|
||||||
isDown = true;
|
|
||||||
break;
|
|
||||||
case MotionEvent.ACTION_UP: // 1
|
|
||||||
case MotionEvent.ACTION_CANCEL: // 3
|
|
||||||
case MotionEvent.ACTION_POINTER_UP: // 6
|
|
||||||
isDown = false;
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
switch (v.getId()) {
|
|
||||||
case R.id.control_up: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_W, 0, isDown); break;
|
|
||||||
case R.id.control_left: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_A, 0, isDown); break;
|
|
||||||
case R.id.control_down: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_S, 0, isDown); break;
|
|
||||||
case R.id.control_right: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_D, 0, isDown); break;
|
|
||||||
case R.id.control_jump: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_SPACE, 0, isDown); break;
|
|
||||||
case R.id.control_primary: sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_LEFT, isDown); break;
|
|
||||||
case R.id.control_secondary:
|
|
||||||
if (CallbackBridge.isGrabbing()) {
|
|
||||||
sendMouseButton(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, isDown);
|
|
||||||
} else {
|
|
||||||
/*
|
|
||||||
if (!isDown) {
|
|
||||||
CallbackBridge.putMouseEventWithCoords(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, CallbackBridge.mouseX, CallbackBridge.mouseY);
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
CallbackBridge.putMouseEventWithCoords(LWJGLGLFWKeycode.GLFW_MOUSE_BUTTON_RIGHT, isDown ? 1 : 0, CallbackBridge.mouseX, CallbackBridge.mouseY);
|
|
||||||
|
|
||||||
setRightOverride(isDown);
|
|
||||||
} break;
|
|
||||||
case R.id.control_debug: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_F3, 0, isDown); break;
|
|
||||||
case R.id.control_shift: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_LEFT_SHIFT, 0, isDown); break;
|
|
||||||
case R.id.control_inventory: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_E, 0, isDown); break;
|
|
||||||
case R.id.control_talk: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_T, 0, isDown); break;
|
|
||||||
case R.id.control_keyboard: showKeyboard(); break;
|
|
||||||
case R.id.control_thirdperson: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_F5, 0, isDown); break;
|
|
||||||
case R.id.control_zoom: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_C, 0, isDown); break;
|
|
||||||
case R.id.control_listplayers: sendKeyPress(LWJGLGLFWKeycode.GLFW_KEY_TAB, 0, isDown); break;
|
|
||||||
}
|
|
||||||
|
|
||||||
return false;
|
|
||||||
}
|
|
||||||
|
|
||||||
private Button findButton(int id) {
|
|
||||||
Button button = (Button) findViewById(id);
|
|
||||||
button.setOnTouchListener(this);
|
|
||||||
button.setFocusable(false);
|
|
||||||
button.setFocusableInTouchMode(false);
|
|
||||||
return button;
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -229,7 +229,7 @@ public class MinecraftDownloaderTask extends AsyncTask<String, String, Throwable
|
||||||
jvmArgs.add("-Xms128M");
|
jvmArgs.add("-Xms128M");
|
||||||
jvmArgs.add("-Xmx1G");
|
jvmArgs.add("-Xmx1G");
|
||||||
*/
|
*/
|
||||||
Intent mainIntent = new Intent(mActivity, CustomCtrlMainActivity.class /* MainActivity.class */);
|
Intent mainIntent = new Intent(mActivity, MainActivity.class /* MainActivity.class */);
|
||||||
// mainIntent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
|
// mainIntent.addFlags(Intent.FLAG_ACTIVITY_LAUNCH_ADJACENT);
|
||||||
mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
mainIntent.addFlags(Intent.FLAG_ACTIVITY_NEW_DOCUMENT);
|
||||||
mainIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
mainIntent.addFlags(Intent.FLAG_ACTIVITY_MULTIPLE_TASK);
|
||||||
|
|
|
||||||
|
|
@ -1,318 +0,0 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
|
||||||
<android.support.v4.widget.DrawerLayout
|
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:id="@+id/main_drawer_options"
|
|
||||||
android:keepScreenOn="true">
|
|
||||||
|
|
||||||
<FrameLayout
|
|
||||||
android:id="@+id/content_frame"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:layout_height="match_parent">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:id="@+id/main_log_behind_GL"
|
|
||||||
android:maxLines="100"/>
|
|
||||||
|
|
||||||
<net.kdt.pojavlaunch.MinecraftGLView
|
|
||||||
android:id="@+id/main_game_render_view"
|
|
||||||
android:layout_width="fill_parent"
|
|
||||||
android:layout_height="fill_parent"/>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:orientation="vertical"
|
|
||||||
android:id="@+id/main_touchpad"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_height="27dp"
|
|
||||||
android:layout_width="18dp"
|
|
||||||
android:src="@drawable/mouse_pointer"
|
|
||||||
android:id="@+id/main_mouse_pointer"/>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/control_debug"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30.0dip"
|
|
||||||
android:layout_marginLeft="2.0dip"
|
|
||||||
android:layout_marginTop="2.0dip"
|
|
||||||
android:text="@string/control_debug"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:layout_marginRight="2dp"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/control_talk"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30.0dip"
|
|
||||||
android:layout_marginTop="2.0dip"
|
|
||||||
android:layout_marginRight="2.0dip"
|
|
||||||
android:text="@string/control_chat"
|
|
||||||
android:layout_toRightOf="@id/control_debug"
|
|
||||||
android:layout_alignParentTop="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/control_keyboard"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30.0dip"
|
|
||||||
android:layout_marginTop="2.0dip"
|
|
||||||
android:layout_marginRight="2.0dip"
|
|
||||||
android:text="@string/control_keyboard"
|
|
||||||
android:layout_toRightOf="@id/control_talk"
|
|
||||||
android:layout_alignParentTop="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/control_thirdperson"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30.0dip"
|
|
||||||
android:layout_marginLeft="2.0dip"
|
|
||||||
android:layout_marginTop="2.0dip"
|
|
||||||
android:layout_marginRight="2.0dip"
|
|
||||||
android:text="@string/control_thirdperson"
|
|
||||||
android:layout_below="@id/control_debug"
|
|
||||||
android:layout_alignParentLeft="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30.0dip"
|
|
||||||
android:layout_marginTop="2.0dip"
|
|
||||||
android:layout_marginRight="2.0dip"
|
|
||||||
android:text="@string/control_zoom"
|
|
||||||
android:layout_below="@id/control_talk"
|
|
||||||
android:layout_toRightOf="@id/control_thirdperson"
|
|
||||||
android:id="@+id/control_zoom"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="30.0dip"
|
|
||||||
android:layout_marginTop="2.0dip"
|
|
||||||
android:layout_marginRight="2.0dip"
|
|
||||||
android:text="@string/control_listplayers"
|
|
||||||
android:layout_toRightOf="@id/control_keyboard"
|
|
||||||
android:id="@+id/control_listplayers"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:textSize="32.0sp"
|
|
||||||
android:id="@+id/control_down"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginLeft="68.0dip"
|
|
||||||
android:layout_marginBottom="14.0dip"
|
|
||||||
android:text="@string/control_down"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentBottom="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:textSize="32.0sp"
|
|
||||||
android:id="@+id/control_up"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginLeft="68.0dip"
|
|
||||||
android:layout_marginBottom="122.0dip"
|
|
||||||
android:text="@string/control_up"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentBottom="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:textSize="32.0sp"
|
|
||||||
android:id="@+id/control_left"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginLeft="14.0dip"
|
|
||||||
android:layout_marginBottom="68.0dip"
|
|
||||||
android:text="@string/control_left"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentBottom="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:textSize="32.0sp"
|
|
||||||
android:id="@+id/control_right"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginLeft="122.0dip"
|
|
||||||
android:layout_marginBottom="68.0dip"
|
|
||||||
android:text="@string/control_right"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentBottom="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:id="@+id/control_jump"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginRight="68.0dip"
|
|
||||||
android:layout_marginBottom="68.0dip"
|
|
||||||
android:text="@string/control_jump"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:layout_alignParentRight="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:textSize="16.0sp"
|
|
||||||
android:id="@+id/control_primary"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginLeft="14.0dip"
|
|
||||||
android:layout_marginBottom="122.0dip"
|
|
||||||
android:text="@string/control_primary"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentBottom="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:textSize="16.0sp"
|
|
||||||
android:id="@+id/control_secondary"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginLeft="122.0dip"
|
|
||||||
android:layout_marginBottom="122.0dip"
|
|
||||||
android:text="@string/control_secondary"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentBottom="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:textSize="20.0sp"
|
|
||||||
android:id="@+id/control_shift"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginLeft="68.0dip"
|
|
||||||
android:layout_marginBottom="68.0dip"
|
|
||||||
android:text="@string/control_shift"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentBottom="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:textSize="16.0sp"
|
|
||||||
android:id="@+id/control_inventory"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50.0dip"
|
|
||||||
android:layout_height="50.0dip"
|
|
||||||
android:layout_marginLeft="122.0dip"
|
|
||||||
android:layout_marginBottom="14.0dip"
|
|
||||||
android:text="@string/control_inventory"
|
|
||||||
android:layout_alignParentLeft="true"
|
|
||||||
android:layout_alignParentBottom="true"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:layout_height="30dp"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:text="@string/control_mouseoff"
|
|
||||||
android:layout_below="@id/control_debug"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_marginRight="2dp"
|
|
||||||
android:layout_marginTop="2dp"
|
|
||||||
android:onClick="toggleMouse"
|
|
||||||
android:layout_alignParentTop="true"
|
|
||||||
android:id="@+id/control_mouse_toggle"/>
|
|
||||||
|
|
||||||
<Button
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:layout_width="50dp"
|
|
||||||
android:layout_height="50dp"
|
|
||||||
android:text="@string/control_toggle"
|
|
||||||
android:layout_marginBottom="14dp"
|
|
||||||
android:layout_marginLeft="14dp"
|
|
||||||
android:layout_gravity="bottom"
|
|
||||||
android:layout_alignParentBottom="true"
|
|
||||||
android:id="@+id/control_togglecontrol"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<LinearLayout
|
|
||||||
android:id="@+id/content_log_layout"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
|
||||||
android:layout_height="84px"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:gravity="center_vertical"
|
|
||||||
android:background="#555555">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:text="@string/control_viewout"
|
|
||||||
android:paddingLeft="30px"
|
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
|
|
||||||
<ImageView
|
|
||||||
android:layout_height="84px"
|
|
||||||
android:layout_width="84px"
|
|
||||||
android:src="@android:drawable/ic_delete"
|
|
||||||
android:onClick="closeLogOutput"
|
|
||||||
android:layout_alignParentRight="true"
|
|
||||||
android:id="@+id/content_log_close_button"/>
|
|
||||||
|
|
||||||
<ToggleButton
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_toLeftOf="@id/content_log_close_button"
|
|
||||||
android:id="@+id/content_log_toggle_log"/>
|
|
||||||
|
|
||||||
</RelativeLayout>
|
|
||||||
|
|
||||||
<ScrollView
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:id="@+id/content_log_scroll"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:background="#000000">
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:textIsSelectable="true"/>
|
|
||||||
|
|
||||||
</ScrollView>
|
|
||||||
|
|
||||||
</LinearLayout>
|
|
||||||
|
|
||||||
<TextView
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:text="PointerCapture debug"
|
|
||||||
android:id="@+id/content_text_debug"
|
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
|
||||||
|
|
||||||
<android.support.design.widget.NavigationView
|
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_gravity="right"
|
|
||||||
android:fitsSystemWindows="false"
|
|
||||||
app:menu="@menu/menu_runopt"
|
|
||||||
android:id="@+id/main_navigation_view"/>
|
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
|
||||||
|
|
||||||
|
|
@ -1,114 +1,119 @@
|
||||||
<?xml version="1.0" encoding="utf-8"?>
|
<?xml version="1.0" encoding="utf-8"?>
|
||||||
<android.support.v4.widget.DrawerLayout
|
<android.support.v4.widget.DrawerLayout
|
||||||
xmlns:android="http://schemas.android.com/apk/res/android"
|
xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_height="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_alignParentRight="true"
|
android:layout_alignParentRight="true"
|
||||||
android:id="@+id/main_drawer_options"
|
android:id="@+id/main_drawer_options"
|
||||||
android:keepScreenOn="true">
|
android:keepScreenOn="true">
|
||||||
|
|
||||||
<FrameLayout
|
<FrameLayout
|
||||||
android:id="@+id/content_frame"
|
android:id="@+id/content_frame"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="match_parent">
|
android:layout_height="match_parent">
|
||||||
|
|
||||||
<net.kdt.pojavlaunch.customcontrols.ControlLayout
|
<net.kdt.pojavlaunch.customcontrols.ControlLayout
|
||||||
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.MinecraftGLView
|
<net.kdt.pojavlanch.CapturedEditText
|
||||||
android:id="@+id/main_game_render_view"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="fill_parent"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="fill_parent"/>
|
android:id="@+id/main_key_handler"/>
|
||||||
|
|
||||||
<LinearLayout
|
<net.kdt.pojavlaunch.MinecraftGLView
|
||||||
android:layout_height="match_parent"
|
android:id="@+id/main_game_render_view"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="fill_parent"
|
||||||
android:orientation="vertical"
|
android:layout_height="fill_parent"/>
|
||||||
android:id="@+id/main_touchpad"
|
|
||||||
android:visibility="gone">
|
|
||||||
|
|
||||||
<ImageView
|
<LinearLayout
|
||||||
android:layout_height="27dp"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="18dp"
|
android:layout_width="match_parent"
|
||||||
android:src="@drawable/mouse_pointer"
|
android:orientation="vertical"
|
||||||
android:id="@+id/main_mouse_pointer"/>
|
android:id="@+id/main_touchpad"
|
||||||
|
android:visibility="gone">
|
||||||
|
|
||||||
</LinearLayout>
|
<ImageView
|
||||||
|
android:layout_height="27dp"
|
||||||
|
android:layout_width="18dp"
|
||||||
|
android:src="@drawable/mouse_pointer"
|
||||||
|
android:id="@+id/main_mouse_pointer"/>
|
||||||
|
|
||||||
</net.kdt.pojavlaunch.customcontrols.ControlLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<LinearLayout
|
</net.kdt.pojavlaunch.customcontrols.ControlLayout>
|
||||||
android:id="@+id/content_log_layout"
|
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:visibility="gone"
|
|
||||||
android:orientation="vertical">
|
|
||||||
|
|
||||||
<RelativeLayout
|
<LinearLayout
|
||||||
android:layout_height="84px"
|
android:id="@+id/content_log_layout"
|
||||||
android:layout_width="match_parent"
|
android:layout_height="match_parent"
|
||||||
android:gravity="center_vertical"
|
android:layout_width="match_parent"
|
||||||
android:background="#555555">
|
android:visibility="gone"
|
||||||
|
android:orientation="vertical">
|
||||||
|
|
||||||
<TextView
|
<RelativeLayout
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="84px"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:text="@string/control_viewout"
|
android:gravity="center_vertical"
|
||||||
android:paddingLeft="30px"
|
android:background="#555555">
|
||||||
android:textAppearance="?android:attr/textAppearanceMedium"
|
|
||||||
android:layout_centerVertical="true"/>
|
|
||||||
|
|
||||||
<ImageView
|
<TextView
|
||||||
android:layout_height="84px"
|
android:layout_height="wrap_content"
|
||||||
android:layout_width="84px"
|
android:layout_width="wrap_content"
|
||||||
android:src="@android:drawable/ic_delete"
|
android:text="@string/control_viewout"
|
||||||
android:onClick="closeLogOutput"
|
android:paddingLeft="30px"
|
||||||
android:layout_alignParentRight="true"
|
android:textAppearance="?android:attr/textAppearanceMedium"
|
||||||
android:id="@+id/content_log_close_button"/>
|
android:layout_centerVertical="true"/>
|
||||||
|
|
||||||
<ToggleButton
|
<ImageView
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="84px"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="84px"
|
||||||
android:layout_toLeftOf="@id/content_log_close_button"
|
android:src="@android:drawable/ic_delete"
|
||||||
android:id="@+id/content_log_toggle_log"/>
|
android:onClick="closeLogOutput"
|
||||||
|
android:layout_alignParentRight="true"
|
||||||
|
android:id="@+id/content_log_close_button"/>
|
||||||
|
|
||||||
</RelativeLayout>
|
<ToggleButton
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_toLeftOf="@id/content_log_close_button"
|
||||||
|
android:id="@+id/content_log_toggle_log"/>
|
||||||
|
|
||||||
<ScrollView
|
</RelativeLayout>
|
||||||
android:layout_height="match_parent"
|
|
||||||
android:layout_width="match_parent"
|
|
||||||
android:id="@+id/content_log_scroll"
|
|
||||||
android:alpha="0.8"
|
|
||||||
android:background="#000000">
|
|
||||||
|
|
||||||
<TextView
|
<ScrollView
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent"
|
||||||
android:layout_width="match_parent"
|
android:layout_width="match_parent"
|
||||||
android:textIsSelectable="true"/>
|
android:id="@+id/content_log_scroll"
|
||||||
|
android:alpha="0.8"
|
||||||
|
android:background="#000000">
|
||||||
|
|
||||||
</ScrollView>
|
<TextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="match_parent"
|
||||||
|
android:textIsSelectable="true"/>
|
||||||
|
|
||||||
</LinearLayout>
|
</ScrollView>
|
||||||
|
|
||||||
<TextView
|
</LinearLayout>
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:text="PointerCapture debug"
|
|
||||||
android:id="@+id/content_text_debug"
|
|
||||||
android:visibility="gone"/>
|
|
||||||
|
|
||||||
</FrameLayout>
|
<TextView
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:text="PointerCapture debug"
|
||||||
|
android:id="@+id/content_text_debug"
|
||||||
|
android:visibility="gone"/>
|
||||||
|
|
||||||
<android.support.design.widget.NavigationView
|
</FrameLayout>
|
||||||
android:layout_width="200dp"
|
|
||||||
android:layout_height="match_parent"
|
<android.support.design.widget.NavigationView
|
||||||
android:layout_gravity="right"
|
android:layout_width="200dp"
|
||||||
android:fitsSystemWindows="false"
|
android:layout_height="match_parent"
|
||||||
app:menu="@menu/menu_runopt"
|
android:layout_gravity="right"
|
||||||
android:id="@+id/main_navigation_view"/>
|
android:fitsSystemWindows="false"
|
||||||
|
app:menu="@menu/menu_runopt"
|
||||||
|
android:id="@+id/main_navigation_view"/>
|
||||||
|
|
||||||
</android.support.v4.widget.DrawerLayout>
|
</android.support.v4.widget.DrawerLayout>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue