From 0163db63a6c01b8d7e24ce825e7b28da13d3bf47 Mon Sep 17 00:00:00 2001 From: drdev Date: Sat, 24 May 2014 19:32:13 +0000 Subject: [PATCH] Prevent highlighting reminder text in prompt magnify view --- forge-gui-mobile/src/forge/menu/FMagnifyView.java | 5 +++-- forge-gui-mobile/src/forge/screens/match/views/VPrompt.java | 2 +- .../src/forge/screens/match/winlose/ViewWinLose.java | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/forge-gui-mobile/src/forge/menu/FMagnifyView.java b/forge-gui-mobile/src/forge/menu/FMagnifyView.java index f7506ca954d..e6c22bb2f73 100644 --- a/forge-gui-mobile/src/forge/menu/FMagnifyView.java +++ b/forge-gui-mobile/src/forge/menu/FMagnifyView.java @@ -12,20 +12,21 @@ import forge.util.Utils; public class FMagnifyView extends FDropDown { private static final float PADDING = Utils.scaleMin(5); - private static final TextRenderer renderer = new TextRenderer(true); private FDisplayObject owner; private String text; private FSkinColor foreColor, backColor; private FSkinFont font; + private TextRenderer renderer; - public static void show(FDisplayObject owner0, String text0, FSkinColor foreColor0, FSkinColor backColor0, FSkinFont font0) { + public static void show(FDisplayObject owner0, String text0, FSkinColor foreColor0, FSkinColor backColor0, FSkinFont font0, boolean parseReminderText0) { FMagnifyView view = new FMagnifyView(); view.owner = owner0; view.text = text0; view.foreColor = foreColor0; view.backColor = backColor0; view.font = font0; + view.renderer = new TextRenderer(parseReminderText0); view.show(); } private FMagnifyView() { diff --git a/forge-gui-mobile/src/forge/screens/match/views/VPrompt.java b/forge-gui-mobile/src/forge/screens/match/views/VPrompt.java index 460d1d82cb6..3811ad5bb6f 100644 --- a/forge-gui-mobile/src/forge/screens/match/views/VPrompt.java +++ b/forge-gui-mobile/src/forge/screens/match/views/VPrompt.java @@ -84,7 +84,7 @@ public class VPrompt extends FContainer { float maxHeight = getHeight() - 2 * PADDING; TextBounds textBounds = renderer.getWrappedBounds(message, FONT, maxWidth); if (textBounds.height > maxHeight) { - FMagnifyView.show(this, message, FORE_COLOR, BACK_COLOR, FONT); + FMagnifyView.show(this, message, FORE_COLOR, BACK_COLOR, FONT, false); } return true; } diff --git a/forge-gui-mobile/src/forge/screens/match/winlose/ViewWinLose.java b/forge-gui-mobile/src/forge/screens/match/winlose/ViewWinLose.java index d568a02505e..53f35bc9b39 100644 --- a/forge-gui-mobile/src/forge/screens/match/winlose/ViewWinLose.java +++ b/forge-gui-mobile/src/forge/screens/match/winlose/ViewWinLose.java @@ -86,7 +86,7 @@ public class ViewWinLose extends FOverlay { @Override public boolean tap(float x, float y, int count) { if (txtLog.getMaxScrollTop() > 0) { - FMagnifyView.show(txtLog, txtLog.getText(), FTextArea.FORE_COLOR, ViewWinLose.this.getBackColor(), txtLog.getFont()); + FMagnifyView.show(txtLog, txtLog.getText(), FTextArea.FORE_COLOR, ViewWinLose.this.getBackColor(), txtLog.getFont(), true); } return true; }