mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-15 18:28:00 +00:00
Merge branch 'master' of https://git.cardforge.org/core-developers/forge
This commit is contained in:
@@ -26,6 +26,7 @@ import forge.properties.ForgePreferences;
|
||||
import forge.properties.ForgePreferences.FPref;
|
||||
import forge.screens.home.settings.VSubmenuPreferences.KeyboardShortcutField;
|
||||
import forge.screens.match.CMatchUI;
|
||||
import forge.util.Localizer;
|
||||
|
||||
/**
|
||||
* Consolidates keyboard shortcut assembly into one location
|
||||
@@ -35,7 +36,6 @@ import forge.screens.match.CMatchUI;
|
||||
* and you're done.
|
||||
*/
|
||||
public class KeyboardShortcuts {
|
||||
|
||||
public static List<Shortcut> getKeyboardShortcuts() {
|
||||
return attachKeyboardShortcuts(null);
|
||||
}
|
||||
@@ -200,20 +200,21 @@ public class KeyboardShortcuts {
|
||||
}
|
||||
};
|
||||
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
//========== Instantiate shortcut objects and add to list.
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWSTACK, "Match: show stack panel", actShowStack, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWCOMBAT, "Match: show combat panel", actShowCombat, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWCONSOLE, "Match: show console panel", actShowConsole, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWDEV, "Match: show dev panel", actShowDev, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_CONCEDE, "Match: concede game", actConcede, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_ENDTURN, "Match: pass priority until EOT or next stack event", actEndTurn, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_ALPHASTRIKE, "Match: Alpha Strike (attack with all available)", actAllAttack, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWTARGETING, "Match: toggle targeting visual overlay", actTgtOverlay, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_AUTOYIELD_ALWAYS_YES, "Match: auto-yield ability on stack (Always Yes)", actAutoYieldAndYes, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_AUTOYIELD_ALWAYS_NO, "Match: auto-yield ability on stack (Always No)", actAutoYieldAndNo, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_MACRO_RECORD, "Match: record a macro sequence of actions", actMacroRecord, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_MACRO_NEXT_ACTION, "Match: execute next action in a recorded macro", actMacroNextAction, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_CARD_ZOOM, "Match: zoom the currently selected card", actZoomCard, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWSTACK, localizer.getMessage("lblSHORTCUT_SHOWSTACK"), actShowStack, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWCOMBAT, localizer.getMessage("lblSHORTCUT_SHOWCOMBAT"), actShowCombat, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWCONSOLE, localizer.getMessage("lblSHORTCUT_SHOWCONSOLE"), actShowConsole, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWDEV, localizer.getMessage("lblSHORTCUT_SHOWDEV"), actShowDev, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_CONCEDE, localizer.getMessage("lblSHORTCUT_CONCEDE"), actConcede, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_ENDTURN, localizer.getMessage("lblSHORTCUT_ENDTURN"), actEndTurn, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_ALPHASTRIKE, localizer.getMessage("lblSHORTCUT_ALPHASTRIKE"), actAllAttack, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_SHOWTARGETING, localizer.getMessage("lblSHORTCUT_SHOWTARGETING"), actTgtOverlay, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_AUTOYIELD_ALWAYS_YES, localizer.getMessage("lblSHORTCUT_AUTOYIELD_ALWAYS_YES"), actAutoYieldAndYes, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_AUTOYIELD_ALWAYS_NO, localizer.getMessage("lblSHORTCUT_AUTOYIELD_ALWAYS_NO"), actAutoYieldAndNo, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_MACRO_RECORD, localizer.getMessage("lblSHORTCUT_MACRO_RECORD"), actMacroRecord, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_MACRO_NEXT_ACTION, localizer.getMessage("lblSHORTCUT_MACRO_NEXT_ACTION"), actMacroNextAction, am, im));
|
||||
list.add(new Shortcut(FPref.SHORTCUT_CARD_ZOOM, localizer.getMessage("lblSHORTCUT_CARD_ZOOM"), actZoomCard, am, im));
|
||||
return list;
|
||||
} // End initMatchShortcuts()
|
||||
|
||||
|
||||
@@ -50,6 +50,7 @@ import forge.toolbox.FSkin;
|
||||
import forge.toolbox.FSkin.SkinnedPanel;
|
||||
import forge.view.FDialog;
|
||||
import forge.view.arcane.CardPanel;
|
||||
import forge.util.Localizer;
|
||||
|
||||
/**
|
||||
* Assembles Swing components of assign damage dialog.
|
||||
@@ -61,6 +62,7 @@ import forge.view.arcane.CardPanel;
|
||||
* <br><br><i>(V at beginning of class name denotes a view class.)</i>
|
||||
*/
|
||||
public class VAssignDamage {
|
||||
final Localizer localizer = Localizer.getInstance();
|
||||
private final CMatchUI matchUI;
|
||||
|
||||
// Width and height of blocker dialog
|
||||
@@ -78,12 +80,12 @@ public class VAssignDamage {
|
||||
|
||||
private final GameEntityView defender;
|
||||
|
||||
private final JLabel lblTotalDamage = new FLabel.Builder().text("Available damage points: Unknown").build();
|
||||
private final JLabel lblAssignRemaining = new FLabel.Builder().text("Distribute the remaining damage points among lethally wounded entities").build();
|
||||
private final JLabel lblTotalDamage = new FLabel.Builder().text(localizer.getMessage("lblTotalDamageText")).build();
|
||||
private final JLabel lblAssignRemaining = new FLabel.Builder().text(localizer.getMessage("lblAssignRemainingText")).build();
|
||||
// Label Buttons
|
||||
private final FButton btnOK = new FButton("OK");
|
||||
private final FButton btnReset = new FButton("Reset");
|
||||
private final FButton btnAuto = new FButton("Auto");
|
||||
private final FButton btnOK = new FButton(localizer.getMessage("lblOk"));
|
||||
private final FButton btnReset = new FButton(localizer.getMessage("lblReset"));
|
||||
private final FButton btnAuto = new FButton(localizer.getMessage("lblAuto"));
|
||||
|
||||
|
||||
private static class DamageTarget {
|
||||
@@ -141,8 +143,8 @@ public class VAssignDamage {
|
||||
|
||||
public VAssignDamage(final CMatchUI matchUI, final CardView attacker, final List<CardView> blockers, final int damage0, final GameEntityView defender0, boolean overrideOrder) {
|
||||
this.matchUI = matchUI;
|
||||
|
||||
dlg.setTitle("Assign damage dealt by " + attacker);
|
||||
String s = localizer.getMessage("lbLAssignDamageDealtBy");
|
||||
dlg.setTitle(s.replace("%s",attacker.toString()));
|
||||
|
||||
// Set damage storage vars
|
||||
totalDamageToAssign = damage0;
|
||||
@@ -165,8 +167,8 @@ public class VAssignDamage {
|
||||
final JPanel pnlInfo = new JPanel(new MigLayout("insets 0, gap 0, wrap"));
|
||||
pnlInfo.setOpaque(false);
|
||||
pnlInfo.add(lblTotalDamage, "gap 0 0 20px 5px");
|
||||
pnlInfo.add(new FLabel.Builder().text("Left click: Assign 1 damage. (Left Click + Control): Assign remaining damage up to lethal").build(), "gap 0 0 0 5px");
|
||||
pnlInfo.add(new FLabel.Builder().text("Right click: Unassign 1 damage. (Right Click + Control): Unassign all damage.").build(), "gap 0 0 0 5px");
|
||||
pnlInfo.add(new FLabel.Builder().text(localizer.getMessage("lblLClickDamageMessage")).build(), "gap 0 0 0 5px");
|
||||
pnlInfo.add(new FLabel.Builder().text(localizer.getMessage("lblRClickDamageMessage")).build(), "gap 0 0 0 5px");
|
||||
|
||||
// Defenders area
|
||||
final JPanel pnlDefenders = new JPanel();
|
||||
@@ -401,7 +403,7 @@ public class VAssignDamage {
|
||||
StringBuilder sb = new StringBuilder();
|
||||
sb.append(dmg);
|
||||
if( overkill >= 0 ) {
|
||||
sb.append(" (Lethal");
|
||||
sb.append(" (" +localizer.getMessage("lblLethal"));
|
||||
if( overkill > 0 )
|
||||
sb.append(" +").append(overkill);
|
||||
sb.append(")");
|
||||
|
||||
Reference in New Issue
Block a user