mirror of
https://github.com/correl/mage.git
synced 2024-11-15 03:00:16 +00:00
Hints: disable card hints in m15 render mode;
This commit is contained in:
parent
3f510e97c9
commit
f341d35ece
4 changed files with 13 additions and 1 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
package org.mage.card.arcane;
|
||||
|
||||
import mage.abilities.hint.HintUtils;
|
||||
import mage.cards.ArtRect;
|
||||
import mage.client.dialog.PreferencesDialog;
|
||||
import mage.constants.AbilityType;
|
||||
|
@ -137,12 +138,18 @@ public abstract class CardRenderer {
|
|||
}
|
||||
|
||||
protected void parseRules(List<String> stringRules, ArrayList<TextboxRule> keywords, ArrayList<TextboxRule> rules) {
|
||||
// Translate the textbox text
|
||||
// Translate the textbox text and remove card hints
|
||||
for (String rule : stringRules) {
|
||||
// remove all card hints
|
||||
if (rule.equals(HintUtils.HINT_START_MARK)) {
|
||||
break;
|
||||
}
|
||||
|
||||
// Kill reminder text
|
||||
if (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_CARD_RENDERING_REMINDER_TEXT, "false").equals("false")) {
|
||||
rule = CardRendererUtils.killReminderText(rule).trim();
|
||||
}
|
||||
|
||||
if (!rule.isEmpty()) {
|
||||
TextboxRule tbRule = TextboxRuleParser.parse(cardView, rule);
|
||||
if (tbRule.type == TextboxRuleType.SIMPLE_KEYWORD) {
|
||||
|
|
|
@ -15,6 +15,9 @@ public class HintUtils {
|
|||
public static final String HINT_ICON_BAD = "ICON_BAD";
|
||||
public static final String HINT_ICON_RESTRICT = "ICON_RESTRICT";
|
||||
|
||||
//
|
||||
public static final String HINT_START_MARK = "<br/><hintstart/>"; // workaround to find hint text in rules list and shows it in html
|
||||
|
||||
public static String prepareText(String text, Color color) {
|
||||
return prepareText(text, color, null);
|
||||
}
|
||||
|
|
|
@ -273,6 +273,7 @@ public abstract class CardImpl extends MageObjectImpl implements Card {
|
|||
|
||||
// total hints
|
||||
if (!abilityHints.isEmpty()) {
|
||||
rules.add(HintUtils.HINT_START_MARK);
|
||||
rules.addAll(abilityHints);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -294,6 +294,7 @@ public abstract class PermanentImpl extends CardImpl implements Permanent {
|
|||
|
||||
// total hints
|
||||
if (!abilityHints.isEmpty() || !restrictHints.isEmpty()) {
|
||||
rules.add(HintUtils.HINT_START_MARK);
|
||||
rules.addAll(abilityHints);
|
||||
rules.addAll(restrictHints);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue