Compare commits

...
10 changed files with 92 additions and 19 deletions

No files matched your search

+1 -1
View File
@@ -203,7 +203,7 @@ dependencies {
implementation 'com.github.PojavLauncherTeam:portrait-sdp:ed33e89cbc'
implementation 'com.github.PojavLauncherTeam:portrait-ssp:6c02fd739b'
implementation 'com.github.Mathias-Boulay:ExtendedView:1.0.0'
implementation 'com.github.Mathias-Boulay:android_gamepad_remapper:06184ddbce'
implementation 'com.github.Mathias-Boulay:android_gamepad_remapper:2.0.3'
implementation 'com.github.Mathias-Boulay:virtual-joystick-android:2e7aa25e50'
// implementation 'com.intuit.sdp:sdp-android:1.0.5'
@@ -63,7 +63,8 @@ public class MinecraftGLSurface extends View implements GrabListener {
.remapLeftShoulder(true)
.remapRightShoulder(true)
.remapLeftTrigger(true)
.remapRightTrigger(true));
.remapRightTrigger(true)
.remapDpad(true));
/* Resolution scaler option, allow downsizing a window */
private final float mScaleFactor = LauncherPreferences.PREF_SCALE_FACTOR/100f;
@@ -40,7 +40,8 @@ public class GamepadMapperFragment extends Fragment implements
.remapLeftShoulder(true)
.remapRightShoulder(true)
.remapLeftTrigger(true)
.remapRightTrigger(true);
.remapRightTrigger(true)
.remapDpad(true);
private final Handler mExitHandler = new Handler(Looper.getMainLooper());
private final Runnable mExitRunnable = () -> {
Activity activity = getActivity();
@@ -34,6 +34,7 @@ public class MainMenuFragment extends Fragment {
@Override
public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceState) {
Button mNewsButton = view.findViewById(R.id.news_button);
Button mDiscordButton = view.findViewById(R.id.discord_button);
Button mCustomControlButton = view.findViewById(R.id.custom_control_button);
Button mInstallJarButton = view.findViewById(R.id.install_jar_button);
Button mShareLogsButton = view.findViewById(R.id.share_logs_button);
@@ -43,6 +44,7 @@ public class MainMenuFragment extends Fragment {
mVersionSpinner = view.findViewById(R.id.mc_version_spinner);
mNewsButton.setOnClickListener(v -> Tools.openURL(requireActivity(), Tools.URL_HOME));
mDiscordButton.setOnClickListener(v -> Tools.openURL(requireActivity(), getString(R.string.discord_invite)));
mCustomControlButton.setOnClickListener(v -> startActivity(new Intent(requireContext(), CustomControlsActivity.class)));
mInstallJarButton.setOnClickListener(v -> runInstallerWithConfirmation(false));
mInstallJarButton.setOnLongClickListener(v->{
@@ -0,0 +1,5 @@
<vector xmlns:android="http://schemas.android.com/apk/res/android" android:height="67dp" android:viewportHeight="96.36" android:viewportWidth="127.14" android:width="88.40162dp">
<path android:fillColor="#5865f2" android:pathData="M107.7,8.07A105.15,105.15 0,0 0,81.47 0a72.06,72.06 0,0 0,-3.36 6.83A97.68,97.68 0,0 0,49 6.83,72.37 72.37,0 0,0 45.64,0 105.89,105.89 0,0 0,19.39 8.09C2.79,32.65 -1.71,56.6 0.54,80.21h0A105.73,105.73 0,0 0,32.71 96.36,77.7 77.7,0 0,0 39.6,85.25a68.42,68.42 0,0 1,-10.85 -5.18c0.91,-0.66 1.8,-1.34 2.66,-2a75.57,75.57 0,0 0,64.32 0c0.87,0.71 1.76,1.39 2.66,2a68.68,68.68 0,0 1,-10.87 5.19,77 77,0 0,0 6.89,11.1A105.25,105.25 0,0 0,126.6 80.22h0C129.24,52.84 122.09,29.11 107.7,8.07ZM42.45,65.69C36.18,65.69 31,60 31,53s5,-12.74 11.43,-12.74S54,46 53.89,53 48.84,65.69 42.45,65.69ZM84.69,65.69C78.41,65.69 73.25,60 73.25,53s5,-12.74 11.44,-12.74S96.23,46 96.12,53 91.08,65.69 84.69,65.69Z"/>
</vector>
@@ -19,20 +19,49 @@
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintTop_toTopOf="parent">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/center_guideline"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5"/>
<com.kdt.mcgui.LauncherMenuButton
android:id="@+id/news_button"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/ic_menu_news"
android:text="@string/mcl_tab_wiki" />
android:text="@string/mcl_tab_wiki"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/social_divider"/>
<View
android:id="@+id/social_divider"
android:layout_width="@dimen/padding_tiny"
android:layout_height="0dp"
android:background="@color/divider"
android:layout_marginVertical="@dimen/padding_heavy"
app:layout_constraintTop_toTopOf="@id/news_button"
app:layout_constraintStart_toStartOf="@id/center_guideline"
app:layout_constraintEnd_toEndOf="@id/center_guideline"
app:layout_constraintBottom_toBottomOf="@id/news_button"/>
<com.kdt.mcgui.LauncherMenuButton
android:id="@+id/discord_button"
android:layout_width="0dp"
android:layout_height="wrap_content"
android:layout_marginTop="8dp"
android:layout_marginBottom="8dp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/ic_discord"
android:text="@string/mcl_button_discord"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toEndOf="@id/social_divider"/>
<com.kdt.mcgui.LauncherMenuButton
android:id="@+id/custom_control_button"
@@ -42,7 +71,8 @@
android:layout_marginBottom="8dp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/ic_menu_custom_controls"
android:text="@string/mcl_option_customcontrol" />
android:text="@string/mcl_option_customcontrol"
app:layout_constraintTop_toBottomOf="@id/news_button"/>
<com.kdt.mcgui.LauncherMenuButton
android:id="@+id/install_jar_button"
@@ -52,7 +82,8 @@
android:layout_marginBottom="8dp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@drawable/ic_menu_install_jar"
android:text="@string/main_install_jar_file" />
android:text="@string/main_install_jar_file"
app:layout_constraintTop_toBottomOf="@id/custom_control_button"/>
<com.kdt.mcgui.LauncherMenuButton
android:id="@+id/share_logs_button"
@@ -62,8 +93,9 @@
android:layout_marginBottom="8dp"
android:background="?android:attr/selectableItemBackground"
android:drawableStart="@android:drawable/ic_menu_share"
android:text="@string/main_share_logs" />
</LinearLayout>
android:text="@string/main_share_logs"
app:layout_constraintTop_toBottomOf="@id/install_jar_button"/>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
@@ -15,20 +15,48 @@
android:layout_height="0dp"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintBottom_toTopOf="@id/mc_version_spinner">
<LinearLayout
<androidx.constraintlayout.widget.ConstraintLayout
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:orientation="vertical">
android:layout_height="wrap_content">
<androidx.constraintlayout.widget.Guideline
android:id="@+id/center_guideline"
android:layout_width="0dp"
android:layout_height="0dp"
android:orientation="vertical"
app:layout_constraintGuide_percent="0.5"/>
<com.kdt.mcgui.LauncherMenuButton
android:id="@+id/news_button"
android:layout_width="match_parent"
android:layout_width="0dp"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:text="@string/mcl_tab_wiki"
android:drawableStart="@drawable/ic_menu_news"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:layout_constraintEnd_toStartOf="@id/social_divider" />
<View
android:id="@+id/social_divider"
android:layout_width="@dimen/padding_tiny"
android:layout_height="0dp"
android:background="@color/divider"
android:layout_marginVertical="@dimen/padding_large"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toStartOf="@id/center_guideline"
app:layout_constraintEnd_toEndOf="@id/center_guideline"
app:layout_constraintBottom_toBottomOf="@id/news_button"/>
<com.kdt.mcgui.LauncherMenuButton
android:id="@+id/discord_button"
android:layout_width="0dp"
android:layout_height="@dimen/_66sdp"
android:background="?android:attr/selectableItemBackground"
android:text="@string/mcl_button_discord"
android:drawableStart="@drawable/ic_discord"
app:layout_constraintTop_toTopOf="parent"
app:layout_constraintStart_toEndOf="@id/social_divider"
app:layout_constraintEnd_toEndOf="parent"/>
/>
<com.kdt.mcgui.LauncherMenuButton
android:id="@+id/custom_control_button"
@@ -62,7 +90,7 @@
app:layout_constraintTop_toBottomOf="@id/install_jar_button"
/>
</LinearLayout>
</androidx.constraintlayout.widget.ConstraintLayout>
</ScrollView>
<com.kdt.mcgui.mcVersionSpinner
@@ -329,4 +329,5 @@
<string name="newdl_starting">Чтение метаданных игры…</string>
<string name="newdl_downloading_metadata">Загрузка метаданных игры (%s)</string>
<string name="newdl_downloading_game_files">Загрузка файлов… (%d/%d, %.2f МБ)</string>
<string name="discord_invite" translatable="false">https://discord.gg/pojavlauncher-sng-962263126647144449</string>
</resources>
@@ -5,6 +5,7 @@
<color name="minebutton_color">#57CC33</color>
<color name="background_app">#181818</color>
<color name="divider">@color/background_overlay</color>
<color name="background_overlay">#464646</color>
<color name="background_status_bar">#242424</color>
<color name="background_bottom_bar">#232323</color>
@@ -413,4 +413,6 @@
<string name="controller_remapper_expand_entry">Expand to change keycodes</string>
<string name="preference_remap_controller_title">Change controller key bindings</string>
<string name="preference_remap_controller_description">Allows you to modify the keyboard keys bound to each controller button</string>
<string name="mcl_button_discord">Discord</string>
<string name="discord_invite" translatable="false">https://discord.gg/pojavlauncher-724163890803638273</string>
</resources>