Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,6 @@
import com.kdt.mcgui.mcVersionSpinner;

import net.kdt.pojavlaunch.CustomControlsActivity;
import net.kdt.pojavlaunch.fragments.ManageModsFragment;
import net.kdt.pojavlaunch.fragments.SearchModFragment;
import net.kdt.pojavlaunch.prefs.screens.LauncherPreferenceFragment;
import net.kdt.pojavlaunch.R;
import net.kdt.pojavlaunch.Tools;
import net.kdt.pojavlaunch.extra.ExtraConstants;
Expand Down Expand Up @@ -54,8 +51,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
Button mInstallJarButton = view.findViewById(R.id.install_jar_button);
Button mShareLogsButton = view.findViewById(R.id.share_logs_button);
Button mOpenDirectoryButton = view.findViewById(R.id.open_files_button);
Button mModStoreButton = view.findViewById(R.id.mod_store_button);
Button mSettingsMenuButton = view.findViewById(R.id.settings_menu_button);

ImageButton mEditProfileButton = view.findViewById(R.id.edit_profile_button);
Button mPlayButton = view.findViewById(R.id.play_button);
Expand All @@ -64,16 +59,6 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
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)));

// Mod Store → open mod search fragment
if (mModStoreButton != null)
mModStoreButton.setOnClickListener(v -> Tools.swapFragment(requireActivity(),
SearchModFragment.class, SearchModFragment.TAG, null));

// Settings → open settings fragment
if (mSettingsMenuButton != null)
mSettingsMenuButton.setOnClickListener(v -> Tools.swapFragment(requireActivity(),
LauncherPreferenceFragment.class, "SETTINGS", null));
if (hasOnlineProfile()) {
mInstallJarButton.setOnClickListener(v -> runInstallerWithConfirmation(false));
mInstallJarButton.setOnLongClickListener(v -> {
Expand All @@ -90,7 +75,12 @@ public void onViewCreated(@NonNull View view, @Nullable Bundle savedInstanceStat
mShareLogsButton.setOnClickListener((v) -> shareLog(requireContext()));

mOpenDirectoryButton.setOnClickListener((v)-> {
Tools.swapFragment(requireActivity(), ManageModsFragment.class, ManageModsFragment.TAG, null);
if (Tools.isDemoProfile(v.getContext())){ // Say a different message when on demo profile since they might see the hidden demo folder
hasNoOnlineProfileDialog(getActivity(), getString(R.string.demo_unsupported), getString(R.string.change_account));
} else if (!hasOnlineProfile()) { // Otherwise display the generic pop-up to log in
hasNoOnlineProfileDialog(requireActivity());
} else openPath(v.getContext(), getCurrentProfileDirectory(), false);

});


Expand Down

This file was deleted.

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,10 @@
android:id="@+id/account_spinner"
android:layout_width="match_parent"
android:layout_height="@dimen/_52sdp"

android:dropDownWidth="@dimen/_250sdp"
android:dropDownVerticalOffset="@dimen/_52sdp"

app:layout_constraintTop_toTopOf="parent" />

<ImageButton
Expand All @@ -22,21 +24,28 @@
android:src="@drawable/ic_menu_settings"
android:scaleType="fitCenter"
android:paddingVertical="@dimen/_8sdp"

app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintTop_toTopOf="parent" />

<!-- Holding most of the dynamic content -->
<androidx.fragment.app.FragmentContainerView
android:id="@+id/container_fragment"

android:layout_width="match_parent"
android:layout_height="0dp"
app:layout_constraintBottom_toTopOf="@+id/progress_layout"
app:layout_constraintTop_toBottomOf="@+id/account_spinner" />


<com.kdt.mcgui.ProgressLayout
android:id="@+id/progress_layout"
android:layout_width="match_parent"
android:layout_height="wrap_content"

app:layout_constraintBottom_toBottomOf="parent" />

</androidx.constraintlayout.widget.ConstraintLayout>



</androidx.constraintlayout.widget.ConstraintLayout>
Loading
Loading