Android: Create CheatsActivity
This commit is contained in:
parent
15ec7bd546
commit
ee3a5a4a81
|
@ -76,6 +76,12 @@
|
|||
android:theme="@style/DolphinSettingsBase"
|
||||
android:label="@string/settings"/>
|
||||
|
||||
<activity
|
||||
android:name=".features.cheats.ui.CheatsActivity"
|
||||
android:exported="false"
|
||||
android:theme="@style/DolphinSettingsBase"
|
||||
android:label="@string/cheats"/>
|
||||
|
||||
<activity
|
||||
android:name=".activities.EmulationActivity"
|
||||
android:exported="false"
|
||||
|
|
|
@ -12,6 +12,7 @@ import androidx.fragment.app.DialogFragment;
|
|||
|
||||
import org.dolphinemu.dolphinemu.R;
|
||||
import org.dolphinemu.dolphinemu.activities.ConvertActivity;
|
||||
import org.dolphinemu.dolphinemu.features.cheats.ui.CheatsActivity;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.Settings;
|
||||
import org.dolphinemu.dolphinemu.features.settings.model.StringSetting;
|
||||
import org.dolphinemu.dolphinemu.features.settings.ui.MenuTag;
|
||||
|
@ -91,6 +92,9 @@ public class GamePropertiesDialog extends DialogFragment
|
|||
itemsBuilder.add(R.string.properties_edit_game_settings, (dialog, i) ->
|
||||
SettingsActivity.launch(getContext(), MenuTag.SETTINGS, gameId, revision, isWii));
|
||||
|
||||
itemsBuilder.add(R.string.properties_edit_cheats, (dialog, i) ->
|
||||
CheatsActivity.launch(getContext(), gameId, revision));
|
||||
|
||||
itemsBuilder.add(R.string.properties_clear_game_settings, (dialog, i) ->
|
||||
clearGameSettings(gameId));
|
||||
|
||||
|
|
|
@ -0,0 +1,22 @@
|
|||
// SPDX-License-Identifier: GPL-2.0-or-later
|
||||
|
||||
package org.dolphinemu.dolphinemu.features.cheats.ui;
|
||||
|
||||
import android.content.Context;
|
||||
import android.content.Intent;
|
||||
|
||||
import androidx.appcompat.app.AppCompatActivity;
|
||||
|
||||
public class CheatsActivity extends AppCompatActivity
|
||||
{
|
||||
private static final String ARG_GAME_ID = "game_id";
|
||||
private static final String ARG_REVISION = "revision";
|
||||
|
||||
public static void launch(Context context, String gameId, int revision)
|
||||
{
|
||||
Intent intent = new Intent(context, CheatsActivity.class);
|
||||
intent.putExtra(ARG_GAME_ID, gameId);
|
||||
intent.putExtra(ARG_REVISION, revision);
|
||||
context.startActivity(intent);
|
||||
}
|
||||
}
|
|
@ -361,7 +361,8 @@
|
|||
<string name="properties_convert">Convert File</string>
|
||||
<string name="properties_set_default_iso">Set as Default ISO</string>
|
||||
<string name="properties_edit_game_settings">Edit Game Settings</string>
|
||||
<string name="properties_clear_game_settings">Clear Game Settings</string>
|
||||
<string name="properties_edit_cheats">Edit Cheats</string>
|
||||
<string name="properties_clear_game_settings">Clear Game Settings and Cheats</string>
|
||||
<string name="properties_clear_success">Cleared settings for %1$s</string>
|
||||
<string name="properties_clear_failure">Unable to clear settings for %1$s</string>
|
||||
<string name="properties_clear_missing">No game settings to delete</string>
|
||||
|
@ -371,6 +372,8 @@
|
|||
<string name="preferences_extensions">Extension Bindings</string>
|
||||
<string name="game_ini_junk_title">Junk Data Found</string>
|
||||
<string name="game_ini_junk_question">The settings file for this game contains extraneous data added by an old version of Dolphin. This will likely prevent global settings from working as intended.\n\nWould you like to fix this by deleting the settings file for this game? All game-specific settings and cheats that you have added will be removed. This cannot be undone.</string>
|
||||
|
||||
<!-- Game Details Screen -->
|
||||
<string name="game_details_country">Country</string>
|
||||
<string name="game_details_company">Company</string>
|
||||
<string name="game_details_game_id">Game ID</string>
|
||||
|
@ -382,6 +385,10 @@
|
|||
<string name="game_details_no_compression">No Compression</string>
|
||||
<string name="game_details_size_and_format">%1$s (%2$s)</string>
|
||||
|
||||
<!-- Cheats Screen -->
|
||||
<string name="cheats">Cheats</string>
|
||||
<string name="cheats_with_game_id">Cheats: %1$s</string>
|
||||
|
||||
<!-- Convert Screen -->
|
||||
<string name="convert_format">Format</string>
|
||||
<string name="convert_block_size">Block Size</string>
|
||||
|
|
Loading…
Reference in New Issue