GUI: added GUI scale support for ability choice dialog (related to #12155, #969)

This commit is contained in:
Oleg Agafonov 2024-07-27 11:58:35 +04:00
parent 2bf6e3e3a2
commit 21ad11dbdc
6 changed files with 106 additions and 101 deletions

View file

@ -6,6 +6,7 @@ import mage.client.cards.BigCard;
import mage.client.components.ColorPane; import mage.client.components.ColorPane;
import mage.client.dialog.MageDialog; import mage.client.dialog.MageDialog;
import mage.client.game.GamePanel; import mage.client.game.GamePanel;
import mage.client.util.GUISizeHelper;
import mage.client.util.ImageHelper; import mage.client.util.ImageHelper;
import mage.util.CardUtil; import mage.util.CardUtil;
import mage.view.AbilityPickerView; import mage.view.AbilityPickerView;
@ -33,6 +34,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
private static final String DEFAULT_MESSAGE = "Choose spell or ability to play (single-click)"; private static final String DEFAULT_MESSAGE = "Choose spell or ability to play (single-click)";
private static final int DIALOG_WIDTH = 440; private static final int DIALOG_WIDTH = 440;
private static final int DIALOG_HEIGHT = 260; private static final int DIALOG_HEIGHT = 260;
private static final String CHOICE_PREFIX = "<html>";
private static final Logger log = Logger.getLogger(AbilityPicker.class); private static final Logger log = Logger.getLogger(AbilityPicker.class);
@ -40,6 +42,8 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
private List<Object> choices; private List<Object> choices;
private String message = DEFAULT_MESSAGE; private String message = DEFAULT_MESSAGE;
float guiScaleMod = 1.0f;
private UUID gameId; private UUID gameId;
private BackgroundPainter mwPanelPainter; private BackgroundPainter mwPanelPainter;
@ -53,31 +57,15 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
private static final String IMAGE_RIGHT_HOVERED_PATH = "/game/right_hovered.png"; private static final String IMAGE_RIGHT_HOVERED_PATH = "/game/right_hovered.png";
private static final Color SELECTED_COLOR = new Color(64, 147, 208); private static final Color SELECTED_COLOR = new Color(64, 147, 208);
private static Color BORDER_COLOR = new Color(0, 0, 0, 50);
private boolean selected = false; private boolean selected = false;
public AbilityPicker() { public AbilityPicker() {
setSize(DIALOG_WIDTH, DIALOG_HEIGHT); this(1.0f);
initComponents();
jScrollPane2.setOpaque(false);
jScrollPane2.getViewport().setOpaque(false);
UIManager.put("ScrollBar.width", 17);
jScrollPane2.getHorizontalScrollBar().setUI(new MageScrollbarUI());
jScrollPane2.getVerticalScrollBar().setUI(new MageScrollbarUI());
} }
public AbilityPicker(List<Object> choices, String message) { public AbilityPicker(float guiScaleMod) {
this.choices = choices; createAllComponents(guiScaleMod);
setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
setMessageAndPrepare(message);
initComponents();
jScrollPane2.setOpaque(false);
jScrollPane2.getViewport().setOpaque(false);
UIManager.put("ScrollBar.width", 17);
jScrollPane2.getHorizontalScrollBar().setUI(new MageScrollbarUI());
jScrollPane2.getVerticalScrollBar().setUI(new MageScrollbarUI());
} }
public void init(UUID gameId, BigCard bigCard) { public void init(UUID gameId, BigCard bigCard) {
@ -91,6 +79,37 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
} }
} }
private int sizeMod(int value) {
return GUISizeHelper.guiSizeScale(value, this.guiScaleMod);
}
private float sizeMod(float value) {
return GUISizeHelper.guiSizeScale(value, this.guiScaleMod);
}
/**
* Refresh full panel's components due actual GUI settings
*/
public void fullRefresh(float guiScaleMod) {
this.cleanUp();
this.removeAll();
this.createAllComponents(guiScaleMod);
this.invalidate();
}
public void createAllComponents(float guiScaleMod) {
this.guiScaleMod = guiScaleMod;
setSize(sizeMod(DIALOG_WIDTH), sizeMod(DIALOG_HEIGHT));
initComponents();
jScrollPane2.setOpaque(false);
jScrollPane2.getViewport().setOpaque(false);
UIManager.put("ScrollBar.width", sizeMod(17)); // TODO: is it work?
jScrollPane2.getHorizontalScrollBar().setUI(new MageScrollbarUI());
jScrollPane2.getVerticalScrollBar().setUI(new MageScrollbarUI());
}
public void show(AbilityPickerView choices, Point p) { public void show(AbilityPickerView choices, Point p) {
this.choices = new ArrayList<>(); this.choices = new ArrayList<>();
this.selected = true; // to stop previous modal this.selected = true; // to stop previous modal
@ -100,7 +119,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
boolean wasCancelButton = false; boolean wasCancelButton = false;
for (Map.Entry<UUID, String> choice : choices.getChoices().entrySet()) { for (Map.Entry<UUID, String> choice : choices.getChoices().entrySet()) {
wasCancelButton = wasCancelButton || choice.getKey().equals(Modes.CHOOSE_OPTION_CANCEL_ID); wasCancelButton = wasCancelButton || choice.getKey().equals(Modes.CHOOSE_OPTION_CANCEL_ID);
String htmlText = "<html>" + ManaSymbols.replaceSymbolsWithHTML(CardUtil.getTextWithFirstCharUpperCase(choice.getValue()), ManaSymbols.Type.TABLE); String htmlText = CHOICE_PREFIX + ManaSymbols.replaceSymbolsWithHTML(CardUtil.getTextWithFirstCharUpperCase(choice.getValue()), ManaSymbols.Type.DIALOG);
this.choices.add(new AbilityPickerAction(choice.getKey(), htmlText)); this.choices.add(new AbilityPickerAction(choice.getKey(), htmlText));
} }
if (!wasCancelButton) { if (!wasCancelButton) {
@ -120,7 +139,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
this.title.setText(this.message); this.title.setText(this.message);
setVisible(true); setVisible(true);
MageDialog.makeWindowCentered(this, DIALOG_WIDTH, DIALOG_HEIGHT); MageDialog.makeWindowCentered(this, this.getWidth(), this.getHeight());
//startModal(); //startModal();
} }
@ -133,7 +152,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
setBackgroundPainter(mwPanelPainter); setBackgroundPainter(mwPanelPainter);
title = new ColorPane(); title = new ColorPane();
title.setFont(new Font("Times New Roman", 1, 15)); title.setFont(new Font("Times New Roman", 1, sizeMod(15)));
title.setEditable(false); title.setEditable(false);
title.setFocusCycleRoot(false); title.setFocusCycleRoot(false);
title.setOpaque(false); title.setOpaque(false);
@ -160,7 +179,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
rows.setSelectionMode(ListSelectionModel.SINGLE_SELECTION); rows.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
rows.setLayoutOrientation(JList.VERTICAL); rows.setLayoutOrientation(JList.VERTICAL);
rows.setMaximumSize(new Dimension(32767, 32767)); rows.setMaximumSize(new Dimension(32767, 32767));
rows.setMinimumSize(new Dimension(67, 16)); rows.setMinimumSize(new Dimension(sizeMod(67), sizeMod(16)));
rows.setOpaque(false); rows.setOpaque(false);
// mouse actions // mouse actions
@ -173,7 +192,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
} }
}); });
rows.setSelectedIndex(0); rows.setSelectedIndex(0);
rows.setFont(new Font("Times New Roman", 1, 17)); rows.setFont(new Font("Times New Roman", 1, sizeMod(17)));
rows.setBorder(BorderFactory.createEmptyBorder()); rows.setBorder(BorderFactory.createEmptyBorder());
rows.addMouseWheelListener(this); rows.addMouseWheelListener(this);
@ -187,8 +206,8 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.LEADING).add( layout.setHorizontalGroup(layout.createParallelGroup(GroupLayout.LEADING).add(
GroupLayout.TRAILING, GroupLayout.TRAILING,
layout.createSequentialGroup().addContainerGap().add( layout.createSequentialGroup().addContainerGap().add(
layout.createParallelGroup(GroupLayout.TRAILING).add(GroupLayout.LEADING, jScrollPane2, GroupLayout.DEFAULT_SIZE, 422, Short.MAX_VALUE).add(GroupLayout.LEADING, layout.createParallelGroup(GroupLayout.TRAILING).add(GroupLayout.LEADING, jScrollPane2, GroupLayout.DEFAULT_SIZE, sizeMod(422), Short.MAX_VALUE).add(GroupLayout.LEADING,
layout.createSequentialGroup().add(title).addPreferredGap(LayoutStyle.RELATED, 5, Short.MAX_VALUE).add(1, 1, 1)).add( layout.createSequentialGroup().add(title).addPreferredGap(LayoutStyle.RELATED, sizeMod(5), Short.MAX_VALUE).add(sizeMod(1), sizeMod(1), sizeMod(1))).add(
GroupLayout.LEADING, GroupLayout.LEADING,
layout.createSequentialGroup().add(layout.createParallelGroup(GroupLayout.LEADING) layout.createSequentialGroup().add(layout.createParallelGroup(GroupLayout.LEADING)
) )
@ -196,20 +215,20 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
.add( .add(
layout.createParallelGroup(GroupLayout.TRAILING) layout.createParallelGroup(GroupLayout.TRAILING)
.add( .add(
GroupLayout.LEADING, layout.createParallelGroup(GroupLayout.LEADING))))).add(10, 10, 10))); GroupLayout.LEADING, layout.createParallelGroup(GroupLayout.LEADING))))).add(sizeMod(10), sizeMod(10), sizeMod(10))));
layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.LEADING).add( layout.setVerticalGroup(layout.createParallelGroup(GroupLayout.LEADING).add(
layout.createSequentialGroup().add( layout.createSequentialGroup().add(
layout.createParallelGroup(GroupLayout.LEADING).add( layout.createParallelGroup(GroupLayout.LEADING).add(
layout.createSequentialGroup().add(title, GroupLayout.PREFERRED_SIZE, 72, GroupLayout.PREFERRED_SIZE) layout.createSequentialGroup().add(title, GroupLayout.PREFERRED_SIZE, sizeMod(72), GroupLayout.PREFERRED_SIZE)
.add(5, 5, 5) .add(sizeMod(5), sizeMod(5), sizeMod(5))
.add( .add(
layout.createParallelGroup(GroupLayout.BASELINE) layout.createParallelGroup(GroupLayout.BASELINE)
) )
).add(layout.createSequentialGroup().add(8, 8, 8))) ).add(layout.createSequentialGroup().add(sizeMod(8), sizeMod(8), sizeMod(8))))
.addPreferredGap(LayoutStyle.RELATED).add(layout.createParallelGroup(GroupLayout.BASELINE)).addPreferredGap(LayoutStyle.RELATED).add( .addPreferredGap(LayoutStyle.RELATED).add(layout.createParallelGroup(GroupLayout.BASELINE)).addPreferredGap(LayoutStyle.RELATED).add(
layout.createParallelGroup(GroupLayout.BASELINE)).addPreferredGap(LayoutStyle.RELATED).add(layout.createParallelGroup(GroupLayout.LEADING)).addPreferredGap( layout.createParallelGroup(GroupLayout.BASELINE)).addPreferredGap(LayoutStyle.RELATED).add(layout.createParallelGroup(GroupLayout.LEADING)).addPreferredGap(
LayoutStyle.RELATED).add(jScrollPane2, GroupLayout.PREFERRED_SIZE, 180, GroupLayout.PREFERRED_SIZE).addContainerGap(23, Short.MAX_VALUE))); LayoutStyle.RELATED).add(jScrollPane2, GroupLayout.PREFERRED_SIZE, sizeMod(180), GroupLayout.PREFERRED_SIZE).addContainerGap(sizeMod(23), Short.MAX_VALUE)));
} }
@Override @Override
@ -267,6 +286,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
private static final long serialVersionUID = 7689696087189956997L; private static final long serialVersionUID = 7689696087189956997L;
} }
@Deprecated // do not use modal for it (use PickChoice instead)
private synchronized void startModal() { private synchronized void startModal() {
try { try {
if (SwingUtilities.isEventDispatchThread()) { if (SwingUtilities.isEventDispatchThread()) {
@ -316,40 +336,6 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
} }
public static void main(String[] argv) {
try {
UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
} catch (Exception ex) {
}
JFrame jframe = new JFrame("Test");
List<Object> objectList = new ArrayList<>();
objectList.add("T: add {R}. 111111111111111111111111111");
objectList.add("T: add {B}. {this} deals 1 damage to you.");
objectList.add("{T}: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("T: add {B}");
objectList.add("Cancel");
AbilityPicker panel = new AbilityPicker(objectList, "Choose ability");
jframe.add(panel);
panel.show(objectList);
jframe.setSize(DIALOG_WIDTH, DIALOG_HEIGHT);
jframe.setVisible(true);
}
public class AbilityPickerAction extends AbstractAction { public class AbilityPickerAction extends AbstractAction {
private final UUID id; private final UUID id;
@ -440,7 +426,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
String need = choiceNumber + "."; String need = choiceNumber + ".";
for (Object obj : choices) { for (Object obj : choices) {
AbilityPickerAction action = (AbilityPickerAction) obj; AbilityPickerAction action = (AbilityPickerAction) obj;
if (action.toString().startsWith(need)) { if (action.toString().startsWith(CHOICE_PREFIX + need)) {
action.actionPerformed(null); action.actionPerformed(null);
break; break;
} }
@ -448,7 +434,7 @@ public class AbilityPicker extends JXPanel implements MouseWheelListener {
} }
public void injectHotkeys(GamePanel panel, String commandsPrefix) { public void injectHotkeys(GamePanel panel, String commandsPrefix) {
// TODO: fix that GamePanel recive imput from any place, not only active (e.g. F9 works from lobby) // TODO: fix that GamePanel receive input from any place, not only active (e.g. F9 works from lobby)
int c = JComponent.WHEN_IN_FOCUSED_WINDOW; int c = JComponent.WHEN_IN_FOCUSED_WINDOW;
// choice keys // choice keys

View file

@ -64,7 +64,7 @@ public final class Constants {
public static final String RESOURCE_SYMBOL_FOLDER_PNG = "png"; public static final String RESOURCE_SYMBOL_FOLDER_PNG = "png";
public enum ResourceSymbolSize { public enum ResourceSymbolSize {
SMALL, SMALL, // TODO: delete SMALL, MEDIUM and LARGE as outdated (svg or generated png works fine)
MEDIUM, MEDIUM,
LARGE, LARGE,
SVG, SVG,

View file

@ -290,12 +290,7 @@ public final class GamePanel extends javax.swing.JPanel {
this.players.clear(); this.players.clear();
this.playersWhoLeft.clear(); this.playersWhoLeft.clear();
if (jLayeredPane != null) { uninstallComponents();
jLayeredPane.remove(abilityPicker);
jLayeredPane.remove(DialogManager.getManager(gameId));
}
this.abilityPicker.cleanUp();
DialogManager.removeGame(gameId);
if (pickNumber != null) { if (pickNumber != null) {
pickNumber.removeDialog(); pickNumber.removeDialog();
@ -504,6 +499,12 @@ public final class GamePanel extends javax.swing.JPanel {
} }
}); });
} }
// as workaround: can change size for closed ability picker only
if (this.abilityPicker != null && !this.abilityPicker.isVisible()) {
this.abilityPicker.fullRefresh(GUISizeHelper.dialogsGuiScale);
this.abilityPicker.init(gameId, bigCard);
}
} }
private void saveDividerLocations() { private void saveDividerLocations() {
@ -2904,11 +2905,31 @@ public final class GamePanel extends javax.swing.JPanel {
public void installComponents() { public void installComponents() {
jLayeredPane.setOpaque(false); jLayeredPane.setOpaque(false);
jLayeredPane.add(abilityPicker, JLayeredPane.MODAL_LAYER);
jLayeredPane.add(DialogManager.getManager(gameId), JLayeredPane.MODAL_LAYER, 0); jLayeredPane.add(DialogManager.getManager(gameId), JLayeredPane.MODAL_LAYER, 0);
installAbilityPicker();
}
private void installAbilityPicker() {
jLayeredPane.add(abilityPicker, JLayeredPane.MODAL_LAYER);
abilityPicker.setVisible(false); abilityPicker.setVisible(false);
} }
private void uninstallComponents() {
if (jLayeredPane != null) {
jLayeredPane.remove(DialogManager.getManager(gameId));
}
DialogManager.removeGame(gameId);
uninstallAbilityPicker();
}
private void uninstallAbilityPicker() {
abilityPicker.setVisible(false);
if (jLayeredPane != null) {
jLayeredPane.remove(abilityPicker);
}
this.abilityPicker.cleanUp();
}
private void createPhaseButton(String name, MouseAdapter mouseAdapter) { private void createPhaseButton(String name, MouseAdapter mouseAdapter) {
Rectangle rect = new Rectangle(36, 36); Rectangle rect = new Rectangle(36, 36);
HoverButton button = new HoverButton("", ImageManagerImpl.instance.getPhaseImage(name), rect); HoverButton button = new HoverButton("", ImageManagerImpl.instance.getPhaseImage(name), rect);

View file

@ -80,7 +80,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
private String basicTooltipText; private String basicTooltipText;
private static final Map<UUID, Integer> playerLives = new HashMap<>(); private static final Map<UUID, Integer> playerLives = new HashMap<>();
private Font defaultFont = null; private final Font defaultFont;
private PriorityTimer timer; private PriorityTimer timer;
@ -102,6 +102,7 @@ public class PlayerPanelExt extends javax.swing.JPanel {
this.cleanUp(); this.cleanUp();
this.removeAll(); this.removeAll();
this.createAllComponents(guiScaleMod); this.createAllComponents(guiScaleMod);
this.invalidate();
} }
public void createAllComponents(float guiScaleMod) { public void createAllComponents(float guiScaleMod) {

View file

@ -64,6 +64,7 @@ public final class GUISizeHelper {
public static int stackWidth; // percent public static int stackWidth; // percent
public static float playerPanelGuiScale; public static float playerPanelGuiScale;
public static float dialogsGuiScale;
public static Dimension otherZonesCardDimension; public static Dimension otherZonesCardDimension;
public static int otherZonesCardVerticalOffset; public static int otherZonesCardVerticalOffset;
@ -154,6 +155,9 @@ public final class GUISizeHelper {
playerPanelGuiScale = (float) (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_PLAYER_PANEL_SIZE, 14) / 14.0); playerPanelGuiScale = (float) (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_PLAYER_PANEL_SIZE, 14) / 14.0);
// no needs in special size settings - compare dialog font size to find gui scale
dialogsGuiScale = (float) (PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_DIALOG_FONT_SIZE, 14) / 14.0);
int otherZonesCardSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_OTHER_ZONES_SIZE, 14); int otherZonesCardSize = PreferencesDialog.getCachedValue(PreferencesDialog.KEY_GUI_CARD_OTHER_ZONES_SIZE, 14);
otherZonesCardDimension = new Dimension(CARD_IMAGE_WIDTH * otherZonesCardSize / 42, CARD_IMAGE_HEIGHT * otherZonesCardSize / 42); otherZonesCardDimension = new Dimension(CARD_IMAGE_WIDTH * otherZonesCardSize / 42, CARD_IMAGE_HEIGHT * otherZonesCardSize / 42);
if (PreferencesDialog.getRenderMode() == 0) { if (PreferencesDialog.getRenderMode() == 0) {

View file

@ -604,18 +604,13 @@ public final class ManaSymbols {
} }
/** /**
* Replace images/icons code by real html links. Uses in many places. * Replace images/icons code by real html images. Client side code.
*
* @param value
* @param type
* @return
*/ */
public static synchronized String replaceSymbolsWithHTML(String value, Type type) { public static String replaceSymbolsWithHTML(String value, Type destType) {
// mana cost to HTML images (urls to files) // mana cost to HTML images (urls to files)
// do not use it for new code - try to suppotr svg render // do not use it for new code - try to support svg render
int symbolSize; int symbolSize;
switch (type) { switch (destType) {
case TABLE: case TABLE:
symbolSize = GUISizeHelper.symbolTableSize; symbolSize = GUISizeHelper.symbolTableSize;
break; break;
@ -634,16 +629,14 @@ public final class ManaSymbols {
break; break;
} }
// auto size return replaceSymbolsWithHTML(value, symbolSize);
ResourceSymbolSize needSize = null;
if (symbolSize <= 15) {
needSize = ResourceSymbolSize.SMALL;
} else if (symbolSize <= 25) {
needSize = ResourceSymbolSize.MEDIUM;
} else {
needSize = ResourceSymbolSize.LARGE;
} }
/**
* Replace images/icons code by real html images. Client side code.
*/
public static String replaceSymbolsWithHTML(String value, int symbolsSize) {
// replace every {symbol} to <img> link // replace every {symbol} to <img> link
// ignore data backup // ignore data backup
String replaced = value String replaced = value
@ -658,26 +651,26 @@ public final class ManaSymbols {
replaced = replaced.replace(CardInfo.SPLIT_MANA_SEPARATOR_FULL, CardInfo.SPLIT_MANA_SEPARATOR_RENDER); replaced = replaced.replace(CardInfo.SPLIT_MANA_SEPARATOR_FULL, CardInfo.SPLIT_MANA_SEPARATOR_RENDER);
replaced = REPLACE_SYMBOLS_PATTERN.matcher(replaced).replaceAll( replaced = REPLACE_SYMBOLS_PATTERN.matcher(replaced).replaceAll(
"<img src='" + filePathToUrl(htmlImagesPath) + "$1$2$3" + ".png' alt='$1$2$3' width=" "<img src='" + filePathToUrl(htmlImagesPath) + "$1$2$3" + ".png' alt='$1$2$3' width="
+ symbolSize + " height=" + symbolSize + '>'); + symbolsSize + " height=" + symbolsSize + '>');
// replace hint icons // replace hint icons
if (replaced.contains(HintUtils.HINT_ICON_GOOD)) { if (replaced.contains(HintUtils.HINT_ICON_GOOD)) {
replaced = replaced.replace(HintUtils.HINT_ICON_GOOD, GuiDisplayUtil.getHintIconHtml("good", symbolSize) + "&nbsp;"); replaced = replaced.replace(HintUtils.HINT_ICON_GOOD, GuiDisplayUtil.getHintIconHtml("good", symbolsSize) + "&nbsp;");
} }
if (replaced.contains(HintUtils.HINT_ICON_BAD)) { if (replaced.contains(HintUtils.HINT_ICON_BAD)) {
replaced = replaced.replace(HintUtils.HINT_ICON_BAD, GuiDisplayUtil.getHintIconHtml("bad", symbolSize) + "&nbsp;"); replaced = replaced.replace(HintUtils.HINT_ICON_BAD, GuiDisplayUtil.getHintIconHtml("bad", symbolsSize) + "&nbsp;");
} }
if (replaced.contains(HintUtils.HINT_ICON_RESTRICT)) { if (replaced.contains(HintUtils.HINT_ICON_RESTRICT)) {
replaced = replaced.replace(HintUtils.HINT_ICON_RESTRICT, GuiDisplayUtil.getHintIconHtml("restrict", symbolSize) + "&nbsp;"); replaced = replaced.replace(HintUtils.HINT_ICON_RESTRICT, GuiDisplayUtil.getHintIconHtml("restrict", symbolsSize) + "&nbsp;");
} }
if (replaced.contains(HintUtils.HINT_ICON_REQUIRE)) { if (replaced.contains(HintUtils.HINT_ICON_REQUIRE)) {
replaced = replaced.replace(HintUtils.HINT_ICON_REQUIRE, GuiDisplayUtil.getHintIconHtml("require", symbolSize) + "&nbsp;"); replaced = replaced.replace(HintUtils.HINT_ICON_REQUIRE, GuiDisplayUtil.getHintIconHtml("require", symbolsSize) + "&nbsp;");
} }
if (replaced.contains(HintUtils.HINT_ICON_DUNGEON_ROOM_CURRENT)) { if (replaced.contains(HintUtils.HINT_ICON_DUNGEON_ROOM_CURRENT)) {
replaced = replaced.replace(HintUtils.HINT_ICON_DUNGEON_ROOM_CURRENT, GuiDisplayUtil.getHintIconHtml("arrow-right-square-fill-green", symbolSize) + "&nbsp;"); replaced = replaced.replace(HintUtils.HINT_ICON_DUNGEON_ROOM_CURRENT, GuiDisplayUtil.getHintIconHtml("arrow-right-square-fill-green", symbolsSize) + "&nbsp;");
} }
if (replaced.contains(HintUtils.HINT_ICON_DUNGEON_ROOM_NEXT)) { if (replaced.contains(HintUtils.HINT_ICON_DUNGEON_ROOM_NEXT)) {
replaced = replaced.replace(HintUtils.HINT_ICON_DUNGEON_ROOM_NEXT, GuiDisplayUtil.getHintIconHtml("arrow-down-right-square fill-yellow", symbolSize) + "&nbsp;"); replaced = replaced.replace(HintUtils.HINT_ICON_DUNGEON_ROOM_NEXT, GuiDisplayUtil.getHintIconHtml("arrow-down-right-square fill-yellow", symbolsSize) + "&nbsp;");
} }
// ignored data restore // ignored data restore