mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-10 10:20:32 -07:00
Icons are back for SD
This commit is contained in:
parent
2962c55adf
commit
1f6f4f2b4e
16 changed files with 153 additions and 52 deletions
|
|
@ -1,5 +1,5 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'com.android.application' version '7.4.2'
|
id 'com.android.application' version '8.1.2'
|
||||||
}
|
}
|
||||||
|
|
||||||
static def getDate() { return new Date().format('yyyyMMdd') }
|
static def getDate() { return new Date().format('yyyyMMdd') }
|
||||||
|
|
@ -81,9 +81,6 @@ android {
|
||||||
|
|
||||||
compileSdk = 33
|
compileSdk = 33
|
||||||
|
|
||||||
lintOptions {
|
|
||||||
abortOnError false
|
|
||||||
}
|
|
||||||
|
|
||||||
signingConfigs {
|
signingConfigs {
|
||||||
customDebug {
|
customDebug {
|
||||||
|
|
@ -168,6 +165,9 @@ android {
|
||||||
}
|
}
|
||||||
|
|
||||||
buildToolsVersion = '33.0.2'
|
buildToolsVersion = '33.0.2'
|
||||||
|
lint {
|
||||||
|
abortOnError false
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
1697525451441
|
1697613347540
|
||||||
|
|
@ -4,6 +4,7 @@ import static net.kdt.pojavlaunch.MainActivity.fullyExit;
|
||||||
|
|
||||||
import android.annotation.SuppressLint;
|
import android.annotation.SuppressLint;
|
||||||
import android.content.ClipboardManager;
|
import android.content.ClipboardManager;
|
||||||
|
import android.graphics.Color;
|
||||||
import android.os.Bundle;
|
import android.os.Bundle;
|
||||||
import android.util.Log;
|
import android.util.Log;
|
||||||
import android.view.GestureDetector;
|
import android.view.GestureDetector;
|
||||||
|
|
@ -111,6 +112,9 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTouc
|
||||||
if (mGestureDetector.onTouchEvent(event)) {
|
if (mGestureDetector.onTouchEvent(event)) {
|
||||||
sendScaledMousePosition(mouseX,mouseY);
|
sendScaledMousePosition(mouseX,mouseY);
|
||||||
AWTInputBridge.sendMousePress(AWTInputEvent.BUTTON1_DOWN_MASK);
|
AWTInputBridge.sendMousePress(AWTInputEvent.BUTTON1_DOWN_MASK);
|
||||||
|
if(rcState) {
|
||||||
|
clearRC();
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
if (action == MotionEvent.ACTION_MOVE) { // 2
|
if (action == MotionEvent.ACTION_MOVE) { // 2
|
||||||
mouseX = Math.max(0, Math.min(CallbackBridge.physicalWidth, mouseX + x - prevX));
|
mouseX = Math.max(0, Math.min(CallbackBridge.physicalWidth, mouseX + x - prevX));
|
||||||
|
|
@ -143,6 +147,9 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTouc
|
||||||
if (mGestureDetector.onTouchEvent(event)) {
|
if (mGestureDetector.onTouchEvent(event)) {
|
||||||
sendScaledMousePosition(x + mTextureView.getX(), y);
|
sendScaledMousePosition(x + mTextureView.getX(), y);
|
||||||
AWTInputBridge.sendMousePress(AWTInputEvent.BUTTON1_DOWN_MASK);
|
AWTInputBridge.sendMousePress(AWTInputEvent.BUTTON1_DOWN_MASK);
|
||||||
|
if(rcState) {
|
||||||
|
clearRC();
|
||||||
|
}
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -253,9 +260,11 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTouc
|
||||||
Log.i("downthecrop", "Hello from the camrea Button");
|
Log.i("downthecrop", "Hello from the camrea Button");
|
||||||
AWTInputBridge.sendKey((char) AWTInputEvent.VK_F9, AWTInputEvent.VK_F9); // Send F9
|
AWTInputBridge.sendKey((char) AWTInputEvent.VK_F9, AWTInputEvent.VK_F9); // Send F9
|
||||||
cameraMode = true;
|
cameraMode = true;
|
||||||
|
findViewById(R.id.camera).setBackground(getResources().getDrawable( R.drawable.control_button_pressed ));
|
||||||
} else { // Camera Mode off
|
} else { // Camera Mode off
|
||||||
AWTInputBridge.sendKey((char) AWTInputEvent.VK_F8, AWTInputEvent.VK_F8);
|
AWTInputBridge.sendKey((char) AWTInputEvent.VK_F8, AWTInputEvent.VK_F8);
|
||||||
cameraMode = false;
|
cameraMode = false;
|
||||||
|
findViewById(R.id.camera).setBackground(getResources().getDrawable( R.drawable.control_button_normal ));
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case R.id.mouseMode:
|
case R.id.mouseMode:
|
||||||
|
|
@ -281,11 +290,13 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTouc
|
||||||
|
|
||||||
private void clearRC(){
|
private void clearRC(){
|
||||||
rcState = false;
|
rcState = false;
|
||||||
|
findViewById(R.id.mb2).setBackground(getResources().getDrawable( R.drawable.control_button_normal ));
|
||||||
AWTInputBridge.sendKey((char)AWTInputEvent.VK_F10,AWTInputEvent.VK_F10);
|
AWTInputBridge.sendKey((char)AWTInputEvent.VK_F10,AWTInputEvent.VK_F10);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void activateRC(){
|
private void activateRC(){
|
||||||
rcState = true;
|
rcState = true;
|
||||||
|
findViewById(R.id.mb2).setBackground(getResources().getDrawable( R.drawable.control_button_pressed ));
|
||||||
AWTInputBridge.sendKey((char)AWTInputEvent.VK_F11,AWTInputEvent.VK_F11);
|
AWTInputBridge.sendKey((char)AWTInputEvent.VK_F11,AWTInputEvent.VK_F11);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -307,6 +318,12 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTouc
|
||||||
|
|
||||||
public void toggleVirtualMouse(View v) {
|
public void toggleVirtualMouse(View v) {
|
||||||
mIsVirtualMouseEnabled = !mIsVirtualMouseEnabled;
|
mIsVirtualMouseEnabled = !mIsVirtualMouseEnabled;
|
||||||
|
ImageView view = findViewById(R.id.mouseModeIco);
|
||||||
|
if(!mIsVirtualMouseEnabled){
|
||||||
|
view.setImageResource(R.drawable.touch);
|
||||||
|
} else{
|
||||||
|
view.setImageResource(R.drawable.ic_mouse3);
|
||||||
|
}
|
||||||
mTouchPad.setVisibility(mIsVirtualMouseEnabled ? View.VISIBLE : View.GONE);
|
mTouchPad.setVisibility(mIsVirtualMouseEnabled ? View.VISIBLE : View.GONE);
|
||||||
Toast.makeText(this,
|
Toast.makeText(this,
|
||||||
mIsVirtualMouseEnabled ? R.string.control_mouseon : R.string.control_mouseoff,
|
mIsVirtualMouseEnabled ? R.string.control_mouseon : R.string.control_mouseoff,
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,5 @@
|
||||||
<?xml version="1.0" encoding="utf-8" ?>
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
<selector xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
<item android:state_pressed="true" android:drawable="@color/control_button_pressed_color" />
|
<item android:state_pressed="true" android:drawable="@drawable/control_button_pressed" />
|
||||||
<item android:drawable="@color/control_button_color" />
|
<item android:drawable="@drawable/control_button_normal" />
|
||||||
</selector>
|
</selector>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#807f7f7f" />
|
||||||
|
<stroke android:width="2.0dip" android:color="#dd7f7f7f" />
|
||||||
|
<padding android:left="8.0dip" android:top="0.0dip" android:right="8.0dip" android:bottom="0.0dip" />
|
||||||
|
</shape>
|
||||||
|
|
@ -0,0 +1,6 @@
|
||||||
|
<?xml version="1.0" encoding="utf-8" ?>
|
||||||
|
<shape xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<solid android:color="#dd7f7f7f" />
|
||||||
|
<stroke android:width="2.0dip" android:color="#dd7f7f7f" />
|
||||||
|
<padding android:left="8.0dip" android:top="0.0dip" android:right="8.0dip" android:bottom="0.0dip" />
|
||||||
|
</shape>
|
||||||
BIN
app_pojavlauncher/src/main/res/drawable/ic_camera.png
Normal file
BIN
app_pojavlauncher/src/main/res/drawable/ic_camera.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 827 B |
11
app_pojavlauncher/src/main/res/drawable/ic_keyboard.xml
Normal file
11
app_pojavlauncher/src/main/res/drawable/ic_keyboard.xml
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
<vector xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
|
android:width="24dp"
|
||||||
|
android:height="24dp"
|
||||||
|
android:viewportWidth="24"
|
||||||
|
android:viewportHeight="24"
|
||||||
|
android:tint="#FFFFFF"
|
||||||
|
android:alpha="0.8">
|
||||||
|
<path
|
||||||
|
android:fillColor="@android:color/white"
|
||||||
|
android:pathData="M20,5L4,5c-1.1,0 -1.99,0.9 -1.99,2L2,17c0,1.1 0.9,2 2,2h16c1.1,0 2,-0.9 2,-2L22,7c0,-1.1 -0.9,-2 -2,-2zM11,8h2v2h-2L11,8zM11,11h2v2h-2v-2zM8,8h2v2L8,10L8,8zM8,11h2v2L8,13v-2zM7,13L5,13v-2h2v2zM7,10L5,10L5,8h2v2zM16,17L8,17v-2h8v2zM16,13h-2v-2h2v2zM16,10h-2L14,8h2v2zM19,13h-2v-2h2v2zM19,10h-2L17,8h2v2z"/>
|
||||||
|
</vector>
|
||||||
BIN
app_pojavlauncher/src/main/res/drawable/ic_mouse2.png
Normal file
BIN
app_pojavlauncher/src/main/res/drawable/ic_mouse2.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 2.6 KiB |
BIN
app_pojavlauncher/src/main/res/drawable/ic_mouse3.png
Normal file
BIN
app_pojavlauncher/src/main/res/drawable/ic_mouse3.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 843 B |
5
app_pojavlauncher/src/main/res/drawable/touch.xml
Normal file
5
app_pojavlauncher/src/main/res/drawable/touch.xml
Normal file
|
|
@ -0,0 +1,5 @@
|
||||||
|
<vector android:height="24dp" android:tint="#FFFFFF"
|
||||||
|
android:viewportHeight="24" android:viewportWidth="24"
|
||||||
|
android:width="24dp" xmlns:android="http://schemas.android.com/apk/res/android">
|
||||||
|
<path android:fillColor="@android:color/white" android:pathData="M9,11.24V7.5C9,6.12 10.12,5 11.5,5S14,6.12 14,7.5v3.74c1.21,-0.81 2,-2.18 2,-3.74C16,5.01 13.99,3 11.5,3S7,5.01 7,7.5C7,9.06 7.79,10.43 9,11.24zM18.84,15.87l-4.54,-2.26c-0.17,-0.07 -0.35,-0.11 -0.54,-0.11H13v-6C13,6.67 12.33,6 11.5,6S10,6.67 10,7.5v10.74c-3.6,-0.76 -3.54,-0.75 -3.67,-0.75c-0.31,0 -0.59,0.13 -0.79,0.33l-0.79,0.8l4.94,4.94C9.96,23.83 10.34,24 10.75,24h6.79c0.75,0 1.33,-0.55 1.44,-1.28l0.75,-5.27c0.01,-0.07 0.02,-0.14 0.02,-0.2C19.75,16.63 19.37,16.09 18.84,15.87z"/>
|
||||||
|
</vector>
|
||||||
|
|
@ -48,41 +48,95 @@
|
||||||
|
|
||||||
</LinearLayout>
|
</LinearLayout>
|
||||||
|
|
||||||
<Button
|
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||||
android:id="@+id/keyboard"
|
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="match_parent"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="match_parent">
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:text="K"
|
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
|
||||||
app:layout_constraintStart_toStartOf="parent" />
|
|
||||||
|
|
||||||
<Button
|
<FrameLayout
|
||||||
android:id="@+id/mb2"
|
android:id="@+id/keyboardFrame"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/control_button"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:text="MB2"
|
app:layout_constraintStart_toStartOf="parent">
|
||||||
app:layout_constraintBottom_toBottomOf="parent"
|
<ImageView
|
||||||
app:layout_constraintStart_toEndOf="@+id/keyboard" />
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/ic_keyboard" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/keyboard"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/control_button" />
|
||||||
|
|
||||||
<Button
|
</FrameLayout>
|
||||||
android:id="@+id/mouseMode"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:background="@drawable/control_button"
|
|
||||||
android:text="M"
|
|
||||||
app:layout_constraintBottom_toTopOf="@+id/keyboard"
|
|
||||||
app:layout_constraintStart_toStartOf="@+id/keyboard" />
|
|
||||||
|
|
||||||
<Button
|
<FrameLayout
|
||||||
android:id="@+id/camera"
|
android:id="@+id/mb2Frame"
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:background="@drawable/control_button"
|
app:layout_constraintBottom_toBottomOf="parent"
|
||||||
android:text="C"
|
app:layout_constraintStart_toEndOf="@id/keyboardFrame">
|
||||||
app:layout_constraintBottom_toTopOf="@+id/mb2"
|
<ImageView
|
||||||
app:layout_constraintStart_toStartOf="@+id/mb2" />
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/ic_mouse2" />
|
||||||
|
<Button
|
||||||
|
android:id="@+id/mb2"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/control_button" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/mouseModeFrame"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/keyboardFrame"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/keyboardFrame">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:id="@+id/mouseModeIco"
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/touch" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/mouseMode"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/control_button" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
<FrameLayout
|
||||||
|
android:id="@+id/cameraFrame"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
app:layout_constraintBottom_toTopOf="@id/mb2Frame"
|
||||||
|
app:layout_constraintStart_toStartOf="@id/mb2Frame">
|
||||||
|
|
||||||
|
<ImageView
|
||||||
|
android:layout_width="20dp"
|
||||||
|
android:layout_height="20dp"
|
||||||
|
android:layout_gravity="center"
|
||||||
|
android:scaleType="fitCenter"
|
||||||
|
android:src="@drawable/ic_camera" />
|
||||||
|
|
||||||
|
<Button
|
||||||
|
android:id="@+id/camera"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:background="@drawable/control_button" />
|
||||||
|
</FrameLayout>
|
||||||
|
|
||||||
|
|
||||||
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
||||||
|
|
||||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
</androidx.constraintlayout.widget.ConstraintLayout>
|
||||||
|
|
|
||||||
|
|
@ -38,17 +38,6 @@
|
||||||
app2:seekBarIncrement="10"
|
app2:seekBarIncrement="10"
|
||||||
android:icon="@drawable/ic_setting_gesture_time"
|
android:icon="@drawable/ic_setting_gesture_time"
|
||||||
/>
|
/>
|
||||||
<net.kdt.pojavlaunch.prefs.CustomSeekBarPreference
|
|
||||||
android:id="@+id/customSeekBarPreference"
|
|
||||||
android:layout_width="wrap_content"
|
|
||||||
android:layout_height="wrap_content"
|
|
||||||
android:icon="@drawable/ic_setting_gesture_time"
|
|
||||||
android:key="xinset"
|
|
||||||
android:summary="Custom Insets"
|
|
||||||
android:title="Inset the gameframe"
|
|
||||||
app2:seekBarIncrement="10"
|
|
||||||
app2:selectable="false"
|
|
||||||
app2:showSeekBarValue="true" />
|
|
||||||
|
|
||||||
</PreferenceCategory>
|
</PreferenceCategory>
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -32,6 +32,17 @@
|
||||||
android:icon="@drawable/ic_setting_screen_resolution"
|
android:icon="@drawable/ic_setting_screen_resolution"
|
||||||
/>
|
/>
|
||||||
|
|
||||||
|
<net.kdt.pojavlaunch.prefs.CustomSeekBarPreference
|
||||||
|
android:id="@+id/customSeekBarPreference"
|
||||||
|
android:layout_width="wrap_content"
|
||||||
|
android:layout_height="wrap_content"
|
||||||
|
android:icon="@drawable/ic_setting_gesture_time"
|
||||||
|
android:key="xinset"
|
||||||
|
android:summary="Add padding/insets around the HD Client to help with reachability"
|
||||||
|
android:title="Canvas Padding"
|
||||||
|
app2:seekBarIncrement="10"
|
||||||
|
app2:selectable="false"
|
||||||
|
app2:showSeekBarValue="true" />
|
||||||
<SwitchPreference
|
<SwitchPreference
|
||||||
android:title="@string/preference_sustained_performance_title"
|
android:title="@string/preference_sustained_performance_title"
|
||||||
android:summary="@string/preference_sustained_performance_description"
|
android:summary="@string/preference_sustained_performance_description"
|
||||||
|
|
|
||||||
|
|
@ -3,3 +3,6 @@ org.gradle.configureondemand=true
|
||||||
|
|
||||||
android.useAndroidX=true
|
android.useAndroidX=true
|
||||||
android.bundle.language.enableSplit=false
|
android.bundle.language.enableSplit=false
|
||||||
|
android.defaults.buildfeatures.buildconfig=true
|
||||||
|
android.nonTransitiveRClass=false
|
||||||
|
android.nonFinalResIds=false
|
||||||
|
|
|
||||||
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
|
@ -1,6 +1,6 @@
|
||||||
distributionBase=GRADLE_USER_HOME
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-7.6.1-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
zipStorePath=wrapper/dists
|
zipStorePath=wrapper/dists
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue