mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-17 19:28:01 +00:00
Mobile: Translate Settings Tab (unfinished)
This commit is contained in:
@@ -26,6 +26,7 @@ import forge.toolbox.FGroupList;
|
||||
import forge.toolbox.FList;
|
||||
import forge.toolbox.FOptionPane;
|
||||
import forge.util.Callback;
|
||||
import forge.util.Localizer;
|
||||
import forge.util.Utils;
|
||||
|
||||
import java.util.ArrayList;
|
||||
@@ -37,6 +38,8 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
public SettingsPage() {
|
||||
super("Settings", FSkinImage.SETTINGS);
|
||||
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
|
||||
lstSettings.setListItemRenderer(new SettingRenderer());
|
||||
|
||||
lstSettings.addGroup("General Settings");
|
||||
@@ -50,7 +53,7 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
|
||||
//General Settings
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.UI_LANGUAGE, "Language",
|
||||
"Select Language (Excluded Game part. Still a work in progress) (RESTART REQUIRED)",
|
||||
localizer.getMessage("nlSelectLanguage"),
|
||||
FLanguage.getAllLanguages()) {
|
||||
@Override
|
||||
public void valueChanged(String newValue) {
|
||||
@@ -95,8 +98,8 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
0);
|
||||
|
||||
//Gameplay Options
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.MULLIGAN_RULE, "Mulligan Rule",
|
||||
"Choose the version of the Mulligan rule.",
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.MULLIGAN_RULE, localizer.getMessage("cbpMulliganRule"),
|
||||
localizer.getMessage("nlpMulliganRule"),
|
||||
MulliganDefs.getMulliganRuleNames()) {
|
||||
@Override
|
||||
public void valueChanged(String newValue) {
|
||||
@@ -106,68 +109,68 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
}, 1);
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.UI_CURRENT_AI_PROFILE,
|
||||
"AI Personality",
|
||||
"Choose your AI opponent.",
|
||||
localizer.getMessage("nlpAiProfiles"),
|
||||
AiProfileUtil.getProfilesArray()),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_ANTE,
|
||||
"Play for Ante",
|
||||
"Determines whether or not the game is played for ante."),
|
||||
localizer.getMessage("cbAnte"),
|
||||
localizer.getMessage("nlAnte")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_ANTE_MATCH_RARITY,
|
||||
"Match Ante Rarity",
|
||||
"Attempts to make antes the same rarity for all players."),
|
||||
localizer.getMessage("cbAnteMatchRarity"),
|
||||
localizer.getMessage("nlAnteMatchRarity")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.MATCH_HOT_SEAT_MODE,
|
||||
"Hot Seat Mode",
|
||||
"When starting a game with 2 human players, use single prompt to control both players."),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_AI_CHEATS,
|
||||
"Allow AI Cheating",
|
||||
"Allow the AI to cheat to gain advantage (for personalities that have cheat shuffling options set)."),
|
||||
localizer.getMessage("cbEnableAICheats"),
|
||||
localizer.getMessage("nlEnableAICheats")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_MANABURN,
|
||||
"Mana Burn",
|
||||
"Play with mana burn (from pre-Magic 2010 rules)."),
|
||||
localizer.getMessage("cbManaBurn"),
|
||||
localizer.getMessage("nlManaBurn")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_MANA_LOST_PROMPT,
|
||||
"Prompt Mana Pool Emptying",
|
||||
"When enabled, you get a warning if passing priority would cause you to lose mana in your mana pool."),
|
||||
localizer.getMessage("cbManaLostPrompt"),
|
||||
localizer.getMessage("nlManaLostPrompt")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.ENFORCE_DECK_LEGALITY,
|
||||
"Deck Conformance",
|
||||
"Enforces deck legality relevant to each environment (minimum deck sizes, max card count etc)."),
|
||||
localizer.getMessage("cbEnforceDeckLegality"),
|
||||
localizer.getMessage("nlEnforceDeckLegality")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.PERFORMANCE_MODE,
|
||||
"Performance Mode",
|
||||
"Disables additional static abilities checks to speed up the game engine. (Warning: breaks some 'as if had flash' scenarios when casting cards owned by opponents)."),
|
||||
localizer.getMessage("cbPerformanceMode"),
|
||||
localizer.getMessage("nlPerformanceMode")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.MATCH_SIDEBOARD_FOR_AI,
|
||||
"Human Sideboard for AI",
|
||||
"Allows users to sideboard with the AIs deck and sideboard in constructed game formats."),
|
||||
localizer.getMessage("cbSideboardForAI"),
|
||||
localizer.getMessage("nlSideboardForAI")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.FILTERED_HANDS,
|
||||
"Filtered Hands",
|
||||
"Generates two starting hands and keeps the one with the closest to average land count for the deck. (Requires restart)"),
|
||||
localizer.getMessage("cbFilteredHands"),
|
||||
localizer.getMessage("nlFilteredHands")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_CLONE_MODE_SOURCE,
|
||||
"Clones Use Original Card Art",
|
||||
"When enabled clones will use their original art instead of the cloned card's art."),
|
||||
localizer.getMessage("cbCloneImgSource"),
|
||||
localizer.getMessage("nlCloneImgSource")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.MATCHPREF_PROMPT_FREE_BLOCKS,
|
||||
"Free Block Handling",
|
||||
"When enabled, if you would have to pay 0 to block, pay automatically without prompt."),
|
||||
localizer.getMessage("cbPromptFreeBlocks"),
|
||||
localizer.getMessage("nlPromptFreeBlocks")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_DETAILED_SPELLDESC_IN_PROMPT,
|
||||
"Spell Description in Payment Prompt",
|
||||
"When enabled, detailed spell/ability descriptions are shown when choosing targets and paying costs."),
|
||||
localizer.getMessage("cbDetailedPaymentDesc"),
|
||||
localizer.getMessage("nlDetailedPaymentDesc")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_SHOW_STORM_COUNT_IN_PROMPT,
|
||||
"Show Storm Count in Prompt Panel",
|
||||
"When enabled, displays the current storm count in the prompt panel."),
|
||||
localizer.getMessage("cbShowStormCount"),
|
||||
localizer.getMessage("nlShowStormCount")),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_PRESELECT_PREVIOUS_ABILITY_ORDER,
|
||||
"Preselect Last Order of Abilities",
|
||||
"When enabled, preselects the last defined simultaneous ability order in the ordering dialog."),
|
||||
localizer.getMessage("cbPreselectPrevAbOrder"),
|
||||
localizer.getMessage("nlPreselectPrevAbOrder")),
|
||||
1);
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.UI_ALLOW_ORDER_GRAVEYARD_WHEN_NEEDED,
|
||||
"Order Graveyard",
|
||||
@@ -177,37 +180,37 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
ForgeConstants.GRAVEYARD_ORDERING_ALWAYS}),
|
||||
1);
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.UI_AUTO_YIELD_MODE,
|
||||
"Auto-Yield",
|
||||
"Defines the granularity level of auto-yields (yield to each unique ability or to each unique card).",
|
||||
localizer.getMessage("lblAutoYields"),
|
||||
localizer.getMessage("nlpAutoYieldMode"),
|
||||
new String[]{ForgeConstants.AUTO_YIELD_PER_ABILITY, ForgeConstants.AUTO_YIELD_PER_CARD}),
|
||||
1);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_ALLOW_ESC_TO_END_TURN,
|
||||
"Use Escape Key To End Turn",
|
||||
"Allows to use Esc keyboard shortcut to end turn prematurely"),
|
||||
localizer.getMessage("cbEscapeEndsTurn"),
|
||||
localizer.getMessage("nlEscapeEndsTurn")),
|
||||
1);
|
||||
|
||||
//Random Deck Generation
|
||||
lstSettings.addItem(new BooleanSetting(FPref.DECKGEN_NOSMALL,
|
||||
"Remove Small Creatures",
|
||||
"Disables 1/1 and 0/X creatures in generated decks."),
|
||||
localizer.getMessage("cbRemoveSmall"),
|
||||
localizer.getMessage("nlRemoveSmall")),
|
||||
2);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.DECKGEN_CARDBASED,
|
||||
"Include Card-based Deck Generation",
|
||||
"Builds more synergistic random decks"),
|
||||
localizer.getMessage("cbCardBased"),
|
||||
localizer.getMessage("nlCardBased")),
|
||||
2);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.DECKGEN_SINGLETONS,
|
||||
"Singleton Mode",
|
||||
"Disables non-land duplicates in generated decks."),
|
||||
localizer.getMessage("cbSingletons"),
|
||||
localizer.getMessage("nlSingletons")),
|
||||
2);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.DECKGEN_ARTIFACTS,
|
||||
"Remove Artifacts",
|
||||
"Disables artifact cards in generated decks."),
|
||||
localizer.getMessage("cbRemoveArtifacts"),
|
||||
localizer.getMessage("nlRemoveArtifacts")),
|
||||
2);
|
||||
|
||||
//Advanced Settings
|
||||
lstSettings.addItem(new BooleanSetting(FPref.DEV_MODE_ENABLED,
|
||||
"Developer Mode",
|
||||
"Enables menu with functions for testing during development.") {
|
||||
localizer.getMessage("cbDevMode"),
|
||||
localizer.getMessage("nlDevMode")) {
|
||||
@Override
|
||||
public void select() {
|
||||
super.select();
|
||||
@@ -216,33 +219,35 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
}
|
||||
}, 3);
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.DEV_LOG_ENTRY_TYPE,
|
||||
"Game Log Verbosity",
|
||||
"Changes how much information is displayed in the game log. Sorted by least to most verbose.",
|
||||
localizer.getMessage("cbpGameLogEntryType"),
|
||||
localizer.getMessage("nlGameLogEntryType"),
|
||||
GameLogEntryType.class),
|
||||
3);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.LOAD_CARD_SCRIPTS_LAZILY,
|
||||
"Load Card Scripts Lazily",
|
||||
"If turned on, Forge will load card scripts as they're needed instead of at start up. (Warning: Experimental)"), 3);
|
||||
localizer.getMessage("cbLoadCardsLazily"),
|
||||
localizer.getMessage("nlLoadCardsLazily")),
|
||||
3);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.LOAD_HISTORIC_FORMATS,
|
||||
"Load Historic Formats",
|
||||
"If turned on, Forge will load all historic format definitions, this may take slightly longer to load at startup."), 3);
|
||||
localizer.getMessage("cbLoadHistoricFormats"),
|
||||
localizer.getMessage("nlLoadHistoricFormats")),
|
||||
3);
|
||||
|
||||
//Graphic Options
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_ONLINE_IMAGE_FETCHER,
|
||||
"Download missing card art",
|
||||
"Automatically download missing card art"),
|
||||
localizer.getMessage("cbImageFetcher"),
|
||||
localizer.getMessage("nlImageFetcher")),
|
||||
4);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_OVERLAY_FOIL_EFFECT,
|
||||
"Display Foil Overlay",
|
||||
"Displays foil cards with the visual foil overlay effect."),
|
||||
localizer.getMessage("cbDisplayFoil"),
|
||||
localizer.getMessage("nlDisplayFoil")),
|
||||
4);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_RANDOM_FOIL,
|
||||
"Random Foil",
|
||||
"Adds foil effect to random cards."),
|
||||
localizer.getMessage("cbRandomFoil"),
|
||||
localizer.getMessage("nlRandomFoil")),
|
||||
4);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_RANDOM_ART_IN_POOLS,
|
||||
"Randomize Card Art",
|
||||
"Generates cards with random art in generated limited mode card pools."),
|
||||
localizer.getMessage("cbRandomArtInPools"),
|
||||
localizer.getMessage("nlRandomArtInPools")),
|
||||
4);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_COMPACT_TABS,
|
||||
"Compact Tabs",
|
||||
@@ -260,8 +265,8 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
"Show only a single line of text for cards and decks on all list views by default."),
|
||||
4);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_HIDE_REMINDER_TEXT,
|
||||
"Hide Reminder Text",
|
||||
"Hide reminder text in Card Detail pane."),
|
||||
localizer.getMessage("cbHideReminderText"),
|
||||
localizer.getMessage("nlHideReminderText")),
|
||||
4);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_MATCH_IMAGE_VISIBLE,
|
||||
"Show Match Background",
|
||||
@@ -272,8 +277,8 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
"Filter card art on battlefield to make it less pixelated on large screens (restart required, may reduce performance)."),
|
||||
4);
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.UI_DISPLAY_CURRENT_COLORS,
|
||||
"Detailed Card Color",
|
||||
"Displays the breakdown of the current color of cards in the card detail information panel.",
|
||||
localizer.getMessage("cbpDisplayCurrentCardColors"),
|
||||
localizer.getMessage("nlDisplayCurrentCardColors"),
|
||||
new String[]{
|
||||
ForgeConstants.DISP_CURRENT_COLORS_NEVER, ForgeConstants.DISP_CURRENT_COLORS_MULTICOLOR,
|
||||
ForgeConstants.DISP_CURRENT_COLORS_CHANGED, ForgeConstants.DISP_CURRENT_COLORS_MULTI_OR_CHANGED,
|
||||
@@ -297,8 +302,8 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
4);
|
||||
|
||||
lstSettings.addItem(new CustomSelectSetting(FPref.UI_CARD_COUNTER_DISPLAY_TYPE,
|
||||
"Counter Display Type",
|
||||
"Selects the style of the in-game counter display for cards. Text-based is a new tab-like display on the cards. Image-based is the old counter image. Hybrid displays both at once.",
|
||||
localizer.getMessage("cbpCounterDisplayType"),
|
||||
localizer.getMessage("nlCounterDisplayType"),
|
||||
new String[]{
|
||||
ForgeConstants.CounterDisplayType.TEXT.getName(), ForgeConstants.CounterDisplayType.IMAGE.getName(),
|
||||
ForgeConstants.CounterDisplayType.HYBRID.getName(), ForgeConstants.CounterDisplayType.OLD_WHEN_SMALL.getName()}),
|
||||
@@ -338,12 +343,12 @@ public class SettingsPage extends TabPage<SettingsScreen> {
|
||||
|
||||
//Sound Options
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_SOUNDS,
|
||||
"Enable Sounds",
|
||||
"Enable sound effects during the game."),
|
||||
localizer.getMessage("cbEnableSounds"),
|
||||
localizer.getMessage("nlEnableSounds")),
|
||||
7);
|
||||
lstSettings.addItem(new BooleanSetting(FPref.UI_ENABLE_MUSIC,
|
||||
"Enable Music",
|
||||
"Enable background music during the game.") {
|
||||
localizer.getMessage("cbEnableMusic"),
|
||||
localizer.getMessage("nlEnableMusic")) {
|
||||
@Override
|
||||
public void select() {
|
||||
super.select();
|
||||
|
||||
Reference in New Issue
Block a user