mirror of
https://github.com/2009scape/2009Scape-mobile.git
synced 2025-12-20 05:20:14 -07:00
Release preview 11
This commit is contained in:
parent
985ead7f68
commit
b96b9489df
4 changed files with 20 additions and 12 deletions
|
|
@ -8,8 +8,8 @@ android {
|
||||||
applicationId "net.kdt.pojavlaunch"
|
applicationId "net.kdt.pojavlaunch"
|
||||||
minSdkVersion 21
|
minSdkVersion 21
|
||||||
targetSdkVersion 26
|
targetSdkVersion 26
|
||||||
versionCode 156230
|
versionCode 156231
|
||||||
versionName "2.4.2_preview10b2_6392b_20200409"
|
versionName "2.4.2_preview11_6393b_20200411"
|
||||||
}
|
}
|
||||||
|
|
||||||
buildTypes {
|
buildTypes {
|
||||||
|
|
|
||||||
|
|
@ -85,7 +85,7 @@ public class MainActivity extends Activity implements OnTouchListener, OnClickLi
|
||||||
debugButton, shiftButton,
|
debugButton, shiftButton,
|
||||||
keyboardButton, inventoryButton,
|
keyboardButton, inventoryButton,
|
||||||
talkButton, thirdPersonButton,
|
talkButton, thirdPersonButton,
|
||||||
screenshotButton, listPlayersButton,
|
zoomButton, listPlayersButton,
|
||||||
toggleControlButton;
|
toggleControlButton;
|
||||||
private LinearLayout touchPad;
|
private LinearLayout touchPad;
|
||||||
private ImageView mousePointer;
|
private ImageView mousePointer;
|
||||||
|
|
@ -235,7 +235,7 @@ public class MainActivity extends Activity implements OnTouchListener, OnClickLi
|
||||||
this.inventoryButton = findButton(R.id.control_inventory);
|
this.inventoryButton = findButton(R.id.control_inventory);
|
||||||
this.talkButton = findButton(R.id.control_talk);
|
this.talkButton = findButton(R.id.control_talk);
|
||||||
this.thirdPersonButton = findButton(R.id.control_thirdperson);
|
this.thirdPersonButton = findButton(R.id.control_thirdperson);
|
||||||
this.screenshotButton = findButton(R.id.control_screenshot);
|
this.zoomButton = findButton(R.id.control_zoom);
|
||||||
this.listPlayersButton = findButton(R.id.control_listplayers);
|
this.listPlayersButton = findButton(R.id.control_listplayers);
|
||||||
this.toggleControlButton = findButton(R.id.control_togglecontrol);
|
this.toggleControlButton = findButton(R.id.control_togglecontrol);
|
||||||
this.overlayView = (ViewGroup) findViewById(R.id.main_control_overlay);
|
this.overlayView = (ViewGroup) findViewById(R.id.main_control_overlay);
|
||||||
|
|
@ -271,6 +271,7 @@ public class MainActivity extends Activity implements OnTouchListener, OnClickLi
|
||||||
this.debugText = (TextView) findViewById(R.id.content_text_debug);
|
this.debugText = (TextView) findViewById(R.id.content_text_debug);
|
||||||
|
|
||||||
this.toggleControlButton.setOnClickListener(this);
|
this.toggleControlButton.setOnClickListener(this);
|
||||||
|
this.zoomButton.setVisibility(mVersionInfo.optifineLib == null ? View.GONE : View.VISIBLE);
|
||||||
|
|
||||||
this.glSurfaceView = (MinecraftGLView) findViewById(R.id.main_game_render_view);
|
this.glSurfaceView = (MinecraftGLView) findViewById(R.id.main_game_render_view);
|
||||||
|
|
||||||
|
|
@ -388,7 +389,6 @@ public class MainActivity extends Activity implements OnTouchListener, OnClickLi
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
// System.loadLibrary("gl04es");
|
|
||||||
System.loadLibrary("gl04es");
|
System.loadLibrary("gl04es");
|
||||||
|
|
||||||
Bitmap awtGraphics = Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_8888);
|
Bitmap awtGraphics = Bitmap.createBitmap(10, 10, Bitmap.Config.ARGB_8888);
|
||||||
|
|
@ -772,7 +772,7 @@ public class MainActivity extends Activity implements OnTouchListener, OnClickLi
|
||||||
case R.id.control_talk: sendKeyPress(Keyboard.KEY_T, isDown); break;
|
case R.id.control_talk: sendKeyPress(Keyboard.KEY_T, isDown); break;
|
||||||
case R.id.control_keyboard: showKeyboard(); break;
|
case R.id.control_keyboard: showKeyboard(); break;
|
||||||
case R.id.control_thirdperson: sendKeyPress(Keyboard.KEY_F5, isDown); break;
|
case R.id.control_thirdperson: sendKeyPress(Keyboard.KEY_F5, isDown); break;
|
||||||
case R.id.control_screenshot: sendKeyPress(Keyboard.KEY_F2, isDown); break;
|
case R.id.control_zoom: sendKeyPress(Keyboard.KEY_C, isDown); break;
|
||||||
case R.id.control_listplayers: sendKeyPress(Keyboard.KEY_TAB, isDown); break;
|
case R.id.control_listplayers: sendKeyPress(Keyboard.KEY_TAB, isDown); break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -1156,10 +1156,18 @@ public class MainActivity extends Activity implements OnTouchListener, OnClickLi
|
||||||
.show();
|
.show();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
private float pxToDp(float px) {
|
||||||
|
return (px / getResources().getDisplayMetrics().density);
|
||||||
|
}
|
||||||
|
|
||||||
|
private float dpToPx(float dp) {
|
||||||
|
return (dp * getResources().getDisplayMetrics().density);
|
||||||
|
}
|
||||||
|
|
||||||
private Button findButton(int id) {
|
private Button findButton(int id) {
|
||||||
Button button = (Button) findViewById(id);
|
Button button = (Button) findViewById(id);
|
||||||
button.setWidth((int) (button.getWidth() * PojavPreferenceActivity.PREF_BUTTONSIZE));
|
button.setWidth((int) dpToPx(pxToDp(button.getWidth()) * PojavPreferenceActivity.PREF_BUTTONSIZE));
|
||||||
button.setHeight((int) (button.getHeight() * PojavPreferenceActivity.PREF_BUTTONSIZE));
|
button.setHeight((int) dpToPx(pxToDp(button.getHeight()) * PojavPreferenceActivity.PREF_BUTTONSIZE));
|
||||||
button.setOnTouchListener(this);
|
button.setOnTouchListener(this);
|
||||||
return button;
|
return button;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -56,10 +56,10 @@
|
||||||
android:layout_height="30.0dip"
|
android:layout_height="30.0dip"
|
||||||
android:layout_marginTop="2.0dip"
|
android:layout_marginTop="2.0dip"
|
||||||
android:layout_marginRight="2.0dip"
|
android:layout_marginRight="2.0dip"
|
||||||
android:text="@string/control_screenshot"
|
android:text="@string/control_zoom"
|
||||||
android:layout_below="@id/control_talk"
|
android:layout_below="@id/control_talk"
|
||||||
android:layout_toRightOf="@id/control_thirdperson"
|
android:layout_toRightOf="@id/control_thirdperson"
|
||||||
android:id="@+id/control_screenshot"/>
|
android:id="@+id/control_zoom"/>
|
||||||
|
|
||||||
<Button
|
<Button
|
||||||
android:background="@drawable/control_button"
|
android:background="@drawable/control_button"
|
||||||
|
|
|
||||||
|
|
@ -125,11 +125,11 @@
|
||||||
<string name="mcn_exit_confirm">Are you sure want to force exit?</string>
|
<string name="mcn_exit_confirm">Are you sure want to force exit?</string>
|
||||||
|
|
||||||
<!-- MainActivity: Control buttons -->
|
<!-- MainActivity: Control buttons -->
|
||||||
|
<string name="controls">Controls</string>
|
||||||
<string name="control_keyboard">Keyboard</string>
|
<string name="control_keyboard">Keyboard</string>
|
||||||
<string name="control_chat">Chat</string>
|
<string name="control_chat">Chat</string>
|
||||||
<string name="control_debug">Debug</string>
|
<string name="control_debug">Debug</string>
|
||||||
<string name="control_screenshot">Screenshot</string>
|
<string name="control_zoom">Zoom (C)</string>
|
||||||
<string name="controls">Controls</string>
|
|
||||||
<string name="control_primary">Pri</string>
|
<string name="control_primary">Pri</string>
|
||||||
<string name="control_secondary">Sec</string>
|
<string name="control_secondary">Sec</string>
|
||||||
<string name="control_shift">◇</string>
|
<string name="control_shift">◇</string>
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue