mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-21 09:01:56 -07:00
Aggressive reduction of the dependencies, part 1/?
This commit is contained in:
parent
84074885d3
commit
a41826a167
6 changed files with 13 additions and 9 deletions
|
|
@ -122,13 +122,9 @@ dependencies {
|
|||
implementation 'javax.annotation:javax.annotation-api:1.3.2'
|
||||
implementation 'commons-codec:commons-codec:1.14'
|
||||
// implementation 'com.wu-man:android-bsf-api:3.1.3'
|
||||
implementation 'androidx.legacy:legacy-support-v4:1.0.0'
|
||||
implementation 'androidx.preference:preference:1.1.1'
|
||||
implementation 'androidx.appcompat:appcompat:1.4.0'
|
||||
implementation 'androidx.legacy:legacy-preference-v14:1.0.0'
|
||||
implementation 'com.google.android.material:material:1.4.0'
|
||||
implementation 'androidx.annotation:annotation:1.3.0'
|
||||
implementation 'androidx.browser:browser:1.4.0'
|
||||
|
||||
implementation "androidx.constraintlayout:constraintlayout:2.1.2"
|
||||
|
||||
|
|
|
|||
|
|
@ -3,8 +3,9 @@ package com.kdt.mcgui;
|
|||
import android.content.*;
|
||||
import android.util.*;
|
||||
import android.graphics.*;
|
||||
import android.widget.EditText;
|
||||
|
||||
public class MineEditText extends com.google.android.material.textfield.TextInputEditText {
|
||||
public class MineEditText extends androidx.appcompat.widget.AppCompatEditText {
|
||||
public MineEditText(Context ctx) {
|
||||
super(ctx);
|
||||
init();
|
||||
|
|
|
|||
|
|
@ -25,11 +25,11 @@ import android.view.TextureView;
|
|||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.widget.TextView;
|
||||
import android.widget.Toast;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.annotation.RequiresApi;
|
||||
|
||||
import com.google.android.material.math.MathUtils;
|
||||
import net.kdt.pojavlaunch.utils.MathUtils;
|
||||
|
||||
import net.kdt.pojavlaunch.customcontrols.gamepad.Gamepad;
|
||||
import net.kdt.pojavlaunch.prefs.LauncherPreferences;
|
||||
|
|
|
|||
|
|
@ -391,7 +391,7 @@ public class ControlButton extends androidx.appcompat.widget.AppCompatButton imp
|
|||
float MIN_DISTANCE = Tools.dpToPx(8);
|
||||
|
||||
if(button == this) return false;
|
||||
if(com.google.android.material.math.MathUtils.dist(
|
||||
if(net.kdt.pojavlaunch.utils.MathUtils.dist(
|
||||
button.getX() + button.getWidth()/2f,
|
||||
button.getY() + button.getHeight()/2f,
|
||||
getX() + getWidth()/2f,
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import android.view.InputDevice;
|
|||
import android.view.MotionEvent;
|
||||
|
||||
|
||||
import com.google.android.material.math.MathUtils;
|
||||
import net.kdt.pojavlaunch.utils.MathUtils;
|
||||
|
||||
public class GamepadJoystick {
|
||||
|
||||
|
|
|
|||
|
|
@ -7,4 +7,11 @@ public class MathUtils {
|
|||
return (x - in_min) * (out_max - out_min) / (in_max - in_min) + out_min;
|
||||
}
|
||||
|
||||
/** Returns the distance between two points. */
|
||||
public static float dist(float x1, float y1, float x2, float y2) {
|
||||
final float x = (x2 - x1);
|
||||
final float y = (y2 - y1);
|
||||
return (float) Math.hypot(x, y);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue