mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-16 18:58:00 +00:00
Prevent highlighting reminder text in prompt magnify view
This commit is contained in:
@@ -12,20 +12,21 @@ import forge.util.Utils;
|
|||||||
|
|
||||||
public class FMagnifyView extends FDropDown {
|
public class FMagnifyView extends FDropDown {
|
||||||
private static final float PADDING = Utils.scaleMin(5);
|
private static final float PADDING = Utils.scaleMin(5);
|
||||||
private static final TextRenderer renderer = new TextRenderer(true);
|
|
||||||
|
|
||||||
private FDisplayObject owner;
|
private FDisplayObject owner;
|
||||||
private String text;
|
private String text;
|
||||||
private FSkinColor foreColor, backColor;
|
private FSkinColor foreColor, backColor;
|
||||||
private FSkinFont font;
|
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();
|
FMagnifyView view = new FMagnifyView();
|
||||||
view.owner = owner0;
|
view.owner = owner0;
|
||||||
view.text = text0;
|
view.text = text0;
|
||||||
view.foreColor = foreColor0;
|
view.foreColor = foreColor0;
|
||||||
view.backColor = backColor0;
|
view.backColor = backColor0;
|
||||||
view.font = font0;
|
view.font = font0;
|
||||||
|
view.renderer = new TextRenderer(parseReminderText0);
|
||||||
view.show();
|
view.show();
|
||||||
}
|
}
|
||||||
private FMagnifyView() {
|
private FMagnifyView() {
|
||||||
|
|||||||
@@ -84,7 +84,7 @@ public class VPrompt extends FContainer {
|
|||||||
float maxHeight = getHeight() - 2 * PADDING;
|
float maxHeight = getHeight() - 2 * PADDING;
|
||||||
TextBounds textBounds = renderer.getWrappedBounds(message, FONT, maxWidth);
|
TextBounds textBounds = renderer.getWrappedBounds(message, FONT, maxWidth);
|
||||||
if (textBounds.height > maxHeight) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -86,7 +86,7 @@ public class ViewWinLose extends FOverlay {
|
|||||||
@Override
|
@Override
|
||||||
public boolean tap(float x, float y, int count) {
|
public boolean tap(float x, float y, int count) {
|
||||||
if (txtLog.getMaxScrollTop() > 0) {
|
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;
|
return true;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user