mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-09 16:45:37 -07:00
New basic loading of preferences on launch
This commit is contained in:
parent
1196fc8d86
commit
dd25be1bb8
5 changed files with 8 additions and 3 deletions
3
.gitignore
vendored
3
.gitignore
vendored
|
|
@ -4,5 +4,6 @@
|
||||||
app_pojavlauncher/src/main/assets/components/jre
|
app_pojavlauncher/src/main/assets/components/jre
|
||||||
local.properties
|
local.properties
|
||||||
.idea/
|
.idea/
|
||||||
|
.DS_Store
|
||||||
app_pojavlauncher/.cxx/
|
app_pojavlauncher/.cxx/
|
||||||
.vs/
|
.vs/
|
||||||
|
|
|
||||||
|
|
@ -1 +1 @@
|
||||||
1690945073108
|
1696645137999
|
||||||
|
|
@ -1,6 +1,7 @@
|
||||||
package net.kdt.pojavlaunch;
|
package net.kdt.pojavlaunch;
|
||||||
|
|
||||||
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_DISABLE_SWAP_HAND;
|
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_DISABLE_SWAP_HAND;
|
||||||
|
import static net.kdt.pojavlaunch.prefs.LauncherPreferences.PREF_INSET_X;
|
||||||
import static net.kdt.pojavlaunch.utils.MCOptionUtils.getMcScale;
|
import static net.kdt.pojavlaunch.utils.MCOptionUtils.getMcScale;
|
||||||
import static org.lwjgl.glfw.CallbackBridge.sendKeyPress;
|
import static org.lwjgl.glfw.CallbackBridge.sendKeyPress;
|
||||||
import static org.lwjgl.glfw.CallbackBridge.sendMouseButton;
|
import static org.lwjgl.glfw.CallbackBridge.sendMouseButton;
|
||||||
|
|
@ -156,6 +157,7 @@ public class GLFWGLSurface extends View implements GrabListener {
|
||||||
/** Initialize the view and all its settings */
|
/** Initialize the view and all its settings */
|
||||||
@SuppressLint("ClickableViewAccessibility")
|
@SuppressLint("ClickableViewAccessibility")
|
||||||
public void start(){
|
public void start(){
|
||||||
|
System.out.println("Hello.. I can see the inset it: "+PREF_INSET_X);
|
||||||
scaleGestureDetector = new ScaleGestureDetector(this.getContext(), new ScaleListener());
|
scaleGestureDetector = new ScaleGestureDetector(this.getContext(), new ScaleListener());
|
||||||
if(LauncherPreferences.PREF_USE_ALTERNATE_SURFACE){
|
if(LauncherPreferences.PREF_USE_ALTERNATE_SURFACE){
|
||||||
SurfaceView surfaceView = new SurfaceView(getContext());
|
SurfaceView surfaceView = new SurfaceView(getContext());
|
||||||
|
|
|
||||||
|
|
@ -38,6 +38,7 @@ public class LauncherPreferences {
|
||||||
public static boolean PREF_DISABLE_GESTURES = false;
|
public static boolean PREF_DISABLE_GESTURES = false;
|
||||||
public static boolean PREF_DISABLE_SWAP_HAND = false;
|
public static boolean PREF_DISABLE_SWAP_HAND = false;
|
||||||
public static float PREF_MOUSESPEED = 1f;
|
public static float PREF_MOUSESPEED = 1f;
|
||||||
|
public static float PREF_INSET_X = 0f;
|
||||||
public static int PREF_RAM_ALLOCATION;
|
public static int PREF_RAM_ALLOCATION;
|
||||||
public static String PREF_DEFAULT_RUNTIME;
|
public static String PREF_DEFAULT_RUNTIME;
|
||||||
public static boolean PREF_SUSTAINED_PERFORMANCE = false;
|
public static boolean PREF_SUSTAINED_PERFORMANCE = false;
|
||||||
|
|
@ -72,6 +73,7 @@ public class LauncherPreferences {
|
||||||
PREF_BUTTONSIZE = DEFAULT_PREF.getInt("buttonscale", 100);
|
PREF_BUTTONSIZE = DEFAULT_PREF.getInt("buttonscale", 100);
|
||||||
PREF_MOUSESCALE = DEFAULT_PREF.getInt("mousescale", 100);
|
PREF_MOUSESCALE = DEFAULT_PREF.getInt("mousescale", 100);
|
||||||
PREF_MOUSESPEED = ((float)DEFAULT_PREF.getInt("mousespeed",100))/100f;
|
PREF_MOUSESPEED = ((float)DEFAULT_PREF.getInt("mousespeed",100))/100f;
|
||||||
|
PREF_INSET_X = DEFAULT_PREF.getInt("xinset", 0);
|
||||||
PREF_HIDE_SIDEBAR = DEFAULT_PREF.getBoolean("hideSidebar", false);
|
PREF_HIDE_SIDEBAR = DEFAULT_PREF.getBoolean("hideSidebar", false);
|
||||||
PREF_IGNORE_NOTCH = DEFAULT_PREF.getBoolean("ignoreNotch", false);
|
PREF_IGNORE_NOTCH = DEFAULT_PREF.getBoolean("ignoreNotch", false);
|
||||||
PREF_VERTYPE_RELEASE = DEFAULT_PREF.getBoolean("vertype_release", true);
|
PREF_VERTYPE_RELEASE = DEFAULT_PREF.getBoolean("vertype_release", true);
|
||||||
|
|
|
||||||
|
|
@ -43,7 +43,7 @@
|
||||||
android:layout_width="wrap_content"
|
android:layout_width="wrap_content"
|
||||||
android:layout_height="wrap_content"
|
android:layout_height="wrap_content"
|
||||||
android:icon="@drawable/ic_setting_gesture_time"
|
android:icon="@drawable/ic_setting_gesture_time"
|
||||||
android:key="timeLongPressTrigger"
|
android:key="xinset"
|
||||||
android:summary=""Hello""
|
android:summary=""Hello""
|
||||||
android:title=""Example""
|
android:title=""Example""
|
||||||
app2:seekBarIncrement="10"
|
app2:seekBarIncrement="10"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue