Skip to content
GitLab
Explore
Projects
Groups
Snippets
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
Dark98
2006Scape Mobile
Commits
2b8a6322
Commit
2b8a6322
authored
3 years ago
by
downthecrop
Browse files
Options
Download
Email Patches
Plain Diff
Alpha 6
parent
4c014a1e
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
app_2009scape/src/main/AndroidManifest.xml
+2
-0
app_2009scape/src/main/AndroidManifest.xml
app_2009scape/src/main/java/net/kdt/pojavlaunch/JavaGUILauncherActivity.java
+15
-5
...ain/java/net/kdt/pojavlaunch/JavaGUILauncherActivity.java
app_2009scape/src/main/res/raw/beta.jar
+0
-0
app_2009scape/src/main/res/raw/beta.jar
with
17 additions
and
5 deletions
+17
-5
app_2009scape/src/main/AndroidManifest.xml
+
2
-
0
View file @
2b8a6322
...
...
@@ -4,6 +4,8 @@
package=
"net.kdt.pojavlaunch"
>
<uses-feature
android:glEsVersion=
"0x00020000"
/>
<uses-permission
android:name=
"android.permission.VIBRATE"
/>
<uses-permission
android:name=
"android.permission.WRITE_EXTERNAL_STORAGE"
android:maxSdkVersion=
"28"
/>
<uses-permission
android:name=
"android.permission.READ_EXTERNAL_STORAGE"
...
...
This diff is collapsed.
Click to expand it.
app_2009scape/src/main/java/net/kdt/pojavlaunch/JavaGUILauncherActivity.java
+
15
-
5
View file @
2b8a6322
...
...
@@ -3,7 +3,7 @@ package net.kdt.pojavlaunch;
import
android.annotation.SuppressLint
;
import
android.content.Context
;
import
android.os.*
;
import
android.
util.Log
;
import
android.
os.Vibrator
;
import
android.view.*
;
import
android.view.View.*
;
import
android.view.inputmethod.InputMethodManager
;
...
...
@@ -81,6 +81,7 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTou
super
.
onCreate
(
savedInstanceState
);
setContentView
(
R
.
layout
.
install_mod
);
Tools
.
updateWindowSize
(
this
);
Vibrator
vb
=
(
Vibrator
)
getSystemService
(
Context
.
VIBRATOR_SERVICE
);
try
{
MultiRTUtils
.
setRuntimeNamed
(
this
,
LauncherPreferences
.
PREF_DEFAULT_RUNTIME
);
...
...
@@ -134,12 +135,17 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTou
// Long press
totalMovement
+=
Math
.
abs
(
x
-
prevX
)
+
Math
.
abs
(
y
-
prevX
);
if
(!
longPressTriggered
&&
System
.
currentTimeMillis
()
-
touchStart
>
1
0
00
&&
totalMovement
<
5
000
System
.
currentTimeMillis
()
-
touchStart
>
1
5
00
&&
totalMovement
<
8
000
){
longPressTriggered
=
true
;
AWTInputBridge
.
sendKey
((
char
)
118
,
118
);
System
.
out
.
println
(
"LONG PRESS!"
);
if
(
Build
.
VERSION
.
SDK_INT
>=
Build
.
VERSION_CODES
.
O
)
{
vb
.
vibrate
(
VibrationEffect
.
createOneShot
(
100
,
VibrationEffect
.
DEFAULT_AMPLITUDE
));
}
else
{
//deprecated in API 26
vb
.
vibrate
(
100
);
}
return
true
;
}
...
...
@@ -154,7 +160,11 @@ public class JavaGUILauncherActivity extends BaseActivity implements View.OnTou
AWTInputBridge
.
sendMousePress
(
AWTInputEvent
.
BUTTON1_DOWN_MASK
);
case
MotionEvent
.
ACTION_UP
:
// 1
if
(
longPressTriggered
){
AWTInputBridge
.
sendKey
((
char
)
117
,
117
);
// Currently a click is needed to end the drag. MB1
// is not good for banking so MB2 sending instead. Annoying but
// better than the alternative. other buttons 'MB3' ect same outcome
// probably should null the click on client if isHeld is true.
AWTInputBridge
.
sendKey
((
char
)
122
,
122
);
AWTInputBridge
.
sendMousePress
(
AWTInputEvent
.
BUTTON1_DOWN_MASK
);
}
break
;
...
...
This diff is collapsed.
Click to expand it.
app_2009scape/src/main/res/raw/beta.jar
+
0
-
0
View file @
2b8a6322
No preview for this file type
This diff is collapsed.
Click to expand it.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment
Menu
Explore
Projects
Groups
Snippets