mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Fix so advanced search encodes symbols on desktop
This commit is contained in:
@@ -278,4 +278,9 @@ public class GuiDesktop implements IGuiBase {
|
|||||||
//TODO: Show loading overlay
|
//TODO: Show loading overlay
|
||||||
FThreads.invokeInBackgroundThread(task);
|
FThreads.invokeInBackgroundThread(task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String encodeSymbols(String str, boolean formatReminderText) {
|
||||||
|
return FSkin.encodeSymbols(str, formatReminderText);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@@ -988,6 +988,9 @@ public class FSkin {
|
|||||||
e.printStackTrace();
|
e.printStackTrace();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//ensure paragraph and line breaks aren't lost
|
||||||
|
str = str.replaceAll("\r?\n", "<br>");
|
||||||
|
|
||||||
return "<html>" + str + "</html>"; //must wrap in <html> tag for images to appear
|
return "<html>" + str + "</html>"; //must wrap in <html> tag for images to appear
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -285,4 +285,9 @@ public class GuiMobile implements IGuiBase {
|
|||||||
public void runBackgroundTask(String message, Runnable task) {
|
public void runBackgroundTask(String message, Runnable task) {
|
||||||
LoadingOverlay.runBackgroundTask(message, task);
|
LoadingOverlay.runBackgroundTask(message, task);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public String encodeSymbols(String str, boolean formatReminderText) {
|
||||||
|
return str; //not needed for mobile
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -52,4 +52,5 @@ public interface IGuiBase {
|
|||||||
IGuiGame getNewGuiGame();
|
IGuiGame getNewGuiGame();
|
||||||
HostedMatch hostMatch();
|
HostedMatch hostMatch();
|
||||||
void runBackgroundTask(String message, Runnable task);
|
void runBackgroundTask(String message, Runnable task);
|
||||||
|
String encodeSymbols(String str, boolean formatReminderText);
|
||||||
}
|
}
|
||||||
@@ -1016,7 +1016,7 @@ public class AdvancedSearch {
|
|||||||
public void run() {
|
public void run() {
|
||||||
control.setFilter(filter);
|
control.setFilter(filter);
|
||||||
if (filter != null) {
|
if (filter != null) {
|
||||||
control.getBtnFilter().setText(filter.toString());
|
control.getBtnFilter().setText(GuiBase.getInterface().encodeSymbols(filter.toString(), false));
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
control.getBtnFilter().setText(emptyFilterText);
|
control.getBtnFilter().setText(emptyFilterText);
|
||||||
@@ -1087,7 +1087,7 @@ public class AdvancedSearch {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
label.setText(builder.toString());
|
label.setText(GuiBase.getInterface().encodeSymbols(builder.toString(), false));
|
||||||
label.setToolTipText(getTooltip());
|
label.setToolTipText(getTooltip());
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1108,7 +1108,7 @@ public class AdvancedSearch {
|
|||||||
indent += " "; //add an indent level when an open paren is hit
|
indent += " "; //add an indent level when an open paren is hit
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return builder.toString();
|
return GuiBase.getInterface().encodeSymbols(builder.toString(), false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void updateExpression() {
|
public void updateExpression() {
|
||||||
|
|||||||
Reference in New Issue
Block a user