Prevent highlighting reminder text in prompt magnify view

This commit is contained in:
drdev
2014-05-24 19:32:13 +00:00
parent 981e3ace7b
commit 0163db63a6
3 changed files with 5 additions and 4 deletions

View File

@@ -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() {

View File

@@ -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;
}

View File

@@ -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;
}