mirror of
https://github.com/magefree/mage.git
synced 2025-12-25 04:52:07 -08:00
* Finished changes for new preference option to force showing ability picker for 0 mana spells or abilities with only tap costs.
This commit is contained in:
parent
ee76ccfee4
commit
67e25d43bd
7 changed files with 28 additions and 14 deletions
|
|
@ -693,7 +693,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
ProxyType proxyType = Connection.ProxyType.valueByText(prefs.get("proxyType", "None"));
|
||||
String proxyUsername = prefs.get("proxyUsername", "");
|
||||
String proxyPassword = prefs.get("proxyPassword", "");
|
||||
|
||||
int avatarId = PreferencesDialog.getSelectedAvatar();
|
||||
boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true");
|
||||
try {
|
||||
setCursor(new Cursor(Cursor.WAIT_CURSOR));
|
||||
Connection connection = new Connection();
|
||||
|
|
@ -705,6 +706,8 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
|
|||
connection.setProxyPort(proxyPort);
|
||||
connection.setProxyUsername(proxyUsername);
|
||||
connection.setProxyPassword(proxyPassword);
|
||||
connection.setAvatarId(avatarId);
|
||||
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
||||
logger.debug("connecting (auto): " + proxyType + " " + proxyServer + " " + proxyPort + " " + proxyUsername);
|
||||
if (MageFrame.connect(connection)) {
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -199,7 +199,7 @@ public class CardsList extends javax.swing.JPanel implements MouseListener, ICar
|
|||
this.bigCard = bigCard;
|
||||
this.gameId = gameId;
|
||||
|
||||
boolean piles = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DRAFT_PILES_TOGGLE, "True").equals("True");
|
||||
boolean piles = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_DRAFT_PILES_TOGGLE, "true").equals("true");
|
||||
cbSortBy.setSelectedItem(sortSetting.getSortBy());
|
||||
chkPiles.setSelected(piles);
|
||||
currentView.loadCards(showCards, sortSetting, piles, bigCard, gameId);
|
||||
|
|
|
|||
|
|
@ -302,10 +302,11 @@ public class ConnectDialog extends MageDialog {
|
|||
}
|
||||
}
|
||||
|
||||
// Avatar
|
||||
// pref settings
|
||||
int avatarId = PreferencesDialog.getSelectedAvatar();
|
||||
connection.setAvatarId(avatarId);
|
||||
|
||||
boolean showAbilityPickerForced = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_SHOW_ABILITY_PICKER_FORCED, "true").equals("true");
|
||||
connection.setShowAbilityPickerForced(showAbilityPickerForced);
|
||||
logger.debug("connecting: " + connection.getProxyType() + " " + connection.getProxyHost() + " " + connection.getProxyPort());
|
||||
task = new ConnectTask();
|
||||
task.execute();
|
||||
|
|
|
|||
|
|
@ -194,8 +194,8 @@
|
|||
<Component class="javax.swing.JCheckBox" name="showAbilityPickerForced">
|
||||
<Properties>
|
||||
<Property name="selected" type="boolean" value="true"/>
|
||||
<Property name="text" type="java.lang.String" value="Show ability picker for abilities without costs"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="This prevents that you accidently activate abilities without costs that e.g. tap the permanent."/>
|
||||
<Property name="text" type="java.lang.String" value="Show ability picker for abilities or spells without costs"/>
|
||||
<Property name="toolTipText" type="java.lang.String" value="This prevents you from accidently activating abilities without other costs than tapping or casting spells with 0 mana costs."/>
|
||||
<Property name="horizontalAlignment" type="int" value="2"/>
|
||||
</Properties>
|
||||
<Events>
|
||||
|
|
|
|||
|
|
@ -412,8 +412,8 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
main_game.add(showPlayerNamesPermanently, java.awt.BorderLayout.LINE_START);
|
||||
|
||||
showAbilityPickerForced.setSelected(true);
|
||||
showAbilityPickerForced.setText("Show ability picker for abilities without costs");
|
||||
showAbilityPickerForced.setToolTipText("This prevents that you accidently activate abilities without costs that e.g. tap the permanent.");
|
||||
showAbilityPickerForced.setText("Show ability picker for abilities or spells without costs");
|
||||
showAbilityPickerForced.setToolTipText("This prevents you from accidently activating abilities without other costs than tapping or casting spells with 0 mana costs.");
|
||||
showAbilityPickerForced.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);
|
||||
showAbilityPickerForced.addActionListener(new java.awt.event.ActionListener() {
|
||||
public void actionPerformed(java.awt.event.ActionEvent evt) {
|
||||
|
|
@ -1667,6 +1667,7 @@ public class PreferencesDialog extends javax.swing.JDialog {
|
|||
load(prefs, dialog.checkBoxEndOfCOthers, PhaseManager.END_OF_COMBAT_OTHERS);
|
||||
load(prefs, dialog.checkBoxMain2Others, PhaseManager.MAIN_2_OTHERS);
|
||||
load(prefs, dialog.checkBoxEndTurnOthers, PhaseManager.END_OF_TURN_OTHERS);
|
||||
|
||||
load(prefs, dialog.displayBigCardsInHand, KEY_HAND_USE_BIG_CARDS, "true");
|
||||
load(prefs, dialog.showToolTipsInAnyZone, KEY_SHOW_TOOLTIPS_ANY_ZONE, "true");
|
||||
load(prefs, dialog.nonLandPermanentsInOnePile, KEY_PERMANENTS_IN_ONE_PILE, "true");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue