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
d9d21fce
Commit
d9d21fce
authored
5 years ago
by
khanhduytran0
Browse files
Options
Download
Email Patches
Plain Diff
Bump version to 3.0.1 preview2
parent
f1c47f73
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
app/build.gradle
+2
-2
app/build.gradle
app/src/main/java/android/androidVNC/VncCanvasActivity.java
+2
-29
app/src/main/java/android/androidVNC/VncCanvasActivity.java
app/src/main/java/net/kdt/pojavlaunch/Tools.java
+15
-4
app/src/main/java/net/kdt/pojavlaunch/Tools.java
app/src/main/java/net/kdt/pojavlaunch/value/customcontrols/ControlButton.java
+3
-2
...t/kdt/pojavlaunch/value/customcontrols/ControlButton.java
app/src/main/java/net/kdt/pojavlaunch/value/customcontrols/ControlsLayout.java
+5
-4
.../kdt/pojavlaunch/value/customcontrols/ControlsLayout.java
app/src/main/res/layout/canvas.xml
+12
-12
app/src/main/res/layout/canvas.xml
app/src/main/res/values/strings.xml
+2
-1
app/src/main/res/values/strings.xml
with
41 additions
and
54 deletions
+41
-54
app/build.gradle
+
2
-
2
View file @
d9d21fce
...
...
@@ -8,8 +8,8 @@ android {
applicationId
"net.kdt.pojavlaunch"
minSdkVersion
21
targetSdkVersion
25
versionCode
5
versionName
"3.0.1_preview
1_b5
_2020050
9
"
versionCode
6
versionName
"3.0.1_preview
2
_202005
1
0"
}
buildTypes
{
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/android/androidVNC/VncCanvasActivity.java
+
2
-
29
View file @
d9d21fce
...
...
@@ -133,36 +133,9 @@ public class VncCanvasActivity extends AppCompatActivity
mControlLayout
=
findViewById
(
R
.
id
.
main_controllayout
);
mControlLayout
.
setModifiable
(
false
);
if
(
modPath
==
null
)
{
ControlButton
[]
specialButtons
=
ControlButton
.
getSpecialButtons
();
specialButtons
[
0
].
specialButtonListener
=
new
View
.
OnClickListener
(){
@Override
public
void
onClick
(
View
v
)
{
}
};
specialButtons
[
1
].
specialButtonListener
=
new
View
.
OnClickListener
(){
@Override
public
void
onClick
(
View
v
)
{
// showKeyboard();
}
};
// MetaKeyBean.keysByMouseButton.get(VncCanvas.MOUSE_BUTTON_RIGHT);
specialButtons
[
2
].
specialButtonListener
=
new
ControlButton
.
TouchListener
(){
@Override
public
void
onTouch
(
boolean
down
)
{
// showKeyboard();
}
};
specialButtons
[
3
].
specialButtonListener
=
new
ControlButton
.
TouchListener
(){
@Override
public
void
onTouch
(
boolean
down
)
{
// showKeyboard();
}
};
mControlLayout
.
loadLayout
(
getSharedPreferences
(
getPackageName
()
+
"_preferences"
,
MODE_PRIVATE
).
getString
(
"defaultCtrl"
,
Tools
.
CTRLMAP_PATH
+
"/default.json"
));
mControlLayout
.
setControlVisible
(
fals
e
);
boolean
controlVisible
=
fals
e
;
mControlLayout
.
setControlVisible
(
tru
e
);
boolean
controlVisible
=
tru
e
;
for
(
ControlView
specialView
:
mControlLayout
.
getSpecialControlViewArray
())
{
switch
(
specialView
.
getProperties
().
keycode
)
{
case
ControlButton
.
SPECIALBTN_KEYBOARD
:
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/net/kdt/pojavlaunch/Tools.java
+
15
-
4
View file @
d9d21fce
...
...
@@ -234,10 +234,20 @@ public final class Tools
public
static
void
showError
(
final
Context
ctx
,
final
Throwable
e
,
final
boolean
exitIfOk
)
{
showError
(
ctx
,
e
,
exitIfOk
,
false
);
showError
(
ctx
,
ctx
.
getString
(
R
.
string
.
global_error
),
e
,
exitIfOk
,
false
);
}
public
static
void
showError
(
Context
ctx
,
String
customTitle
,
Throwable
e
)
{
showError
(
ctx
,
customTitle
,
e
,
false
);
}
public
static
void
showError
(
final
Context
ctx
,
String
customTitle
,
final
Throwable
e
,
final
boolean
exitIfOk
)
{
showError
(
ctx
,
customTitle
,
e
,
exitIfOk
,
false
);
}
private
static
void
showError
(
final
Context
ctx
,
final
Throwable
e
,
final
boolean
exitIfOk
,
final
boolean
showMore
)
private
static
void
showError
(
final
Context
ctx
,
final
String
customTitle
,
final
Throwable
e
,
final
boolean
exitIfOk
,
final
boolean
showMore
)
{
Runnable
runnable
=
new
Runnable
(){
...
...
@@ -246,7 +256,8 @@ public final class Tools
{
final
String
errMsg
=
showMore
?
Log
.
getStackTraceString
(
e
):
e
.
getMessage
();
new
AlertDialog
.
Builder
((
Context
)
ctx
)
.
setTitle
(
R
.
string
.
global_error
)
//.setTitle(R.string.global_error)
.
setTitle
(
customTitle
)
.
setMessage
(
errMsg
)
.
setPositiveButton
(
android
.
R
.
string
.
ok
,
new
DialogInterface
.
OnClickListener
(){
...
...
@@ -267,7 +278,7 @@ public final class Tools
@Override
public
void
onClick
(
DialogInterface
p1
,
int
p2
)
{
showError
(
ctx
,
e
,
exitIfOk
,
!
showMore
);
showError
(
ctx
,
customTitle
,
e
,
exitIfOk
,
!
showMore
);
}
})
.
setNeutralButton
(
android
.
R
.
string
.
copy
,
new
DialogInterface
.
OnClickListener
(){
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/net/kdt/pojavlaunch/value/customcontrols/ControlButton.java
+
3
-
2
View file @
d9d21fce
...
...
@@ -60,7 +60,7 @@ public class ControlButton implements Cloneable
public boolean holdAlt;
public boolean holdShift;
*/
public
Object
specialButtonListener
;
//
public Object specialButtonListener;
// public boolean hold
public
ControlButton
()
{
...
...
@@ -88,8 +88,9 @@ public class ControlButton implements Cloneable
}
public
ControlButton
(
String
name
,
int
keycode
,
int
keyindex
,
boolean
hidden
,
float
x
,
float
y
,
int
width
,
int
height
)
{
super
();
this
.
name
=
name
;
this
.
keycode
=
keycode
;
this
.
keycode
=
keycode
+
4
;
this
.
keyindex
=
keyindex
;
this
.
hidden
=
hidden
;
this
.
x
=
x
;
...
...
This diff is collapsed.
Click to expand it.
app/src/main/java/net/kdt/pojavlaunch/value/customcontrols/ControlsLayout.java
+
5
-
4
View file @
d9d21fce
...
...
@@ -61,19 +61,20 @@ public class ControlsLayout extends FrameLayout
public
void
loadLayout
(
String
jsonPath
)
{
try
{
loadLayout
(
new
Gson
().
fromJson
(
Tools
.
read
(
jsonPath
),
CustomControls
.
class
));
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
catch
(
Throwable
th
)
{
th
.
printStackTrace
();
Tools
.
showError
(
getContext
(),
getContext
().
getString
(
R
.
string
.
customctrl_error
,
jsonPath
),
th
);
}
}
public
void
loadLayout
(
CustomControls
controlLayout
)
{
mLayout
=
controlLayout
;
// Safety remove only ControlView views
for
(
ControlView
view
:
getControlViewArray
())
{
removeView
(
view
);
}
for
(
ControlButton
button
:
controlLayout
.
button
)
{
addControlView
(
button
);
}
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/layout/canvas.xml
+
12
-
12
View file @
d9d21fce
...
...
@@ -13,23 +13,23 @@
android:layout_height=
"match_parent"
android:orientation=
"vertical"
>
<android.androidVNC.VncCanvas
android:id=
"@+id/vnc_canvas"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"bottom|center"
/>
<ZoomControls
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/zoomer"
android:layout_gravity=
"bottom|center"
/>
<net.kdt.pojavlaunch.value.customcontrols.ControlsLayout
android:id=
"@+id/main_controllayout"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
>
<android.androidVNC.VncCanvas
android:id=
"@+id/vnc_canvas"
android:layout_width=
"match_parent"
android:layout_height=
"match_parent"
android:layout_gravity=
"bottom|center"
/>
<ZoomControls
android:layout_width=
"wrap_content"
android:layout_height=
"wrap_content"
android:id=
"@+id/zoomer"
android:layout_gravity=
"bottom|center"
/>
</net.kdt.pojavlaunch.value.customcontrols.ControlsLayout>
<LinearLayout
...
...
This diff is collapsed.
Click to expand it.
app/src/main/res/values/strings.xml
+
2
-
1
View file @
d9d21fce
...
...
@@ -183,7 +183,8 @@
<string
name=
"control_more3"
></string>
<string
name=
"control_more4"
></string>
<string
name=
"customctrl_error"
>
Unable to load control file %s
</string>
<string
name=
"customctrl_keyname"
>
Keycode
</string>
<string
name=
"customctrl_specialkey"
>
Special Key
</string>
<string
name=
"customctrl_hidden"
>
Hidden
</string>
...
...
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