mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-20 12:48:00 +00:00
[Mobile] cleanup stack item strings
-show optional cost string (ie Kicked, Entwined, etc ) on spells if activated
This commit is contained in:
@@ -396,9 +396,12 @@ public class VStack extends FDropDown {
|
||||
String optionalCostString = !stackInstance.getOptionalCostString().equals("") ? " ("+ stackInstance.getOptionalCostString() + ")" : "";
|
||||
|
||||
if (index == -1) {
|
||||
newtext = TextUtil.fastReplace(TextUtil.fastReplace(text.trim(),"--","-"),"- -","-");
|
||||
newtext = TextUtil.fastReplace(newtext, "- - ", "- ");
|
||||
textRenderer.drawText(g, name + " " + (name.length() > 1 ? cId : "") + "\n" + (newtext.length() > 1 ? newtext : ""),
|
||||
newtext = TextUtil.fastReplace(text.trim(), " ", " ");
|
||||
newtext = TextUtil.fastReplace(TextUtil.fastReplace(newtext,"--","-"),"- -","-");
|
||||
newtext = TextUtil.fastReplace(TextUtil.fastReplace(newtext, " and .", ".")," .", ".");
|
||||
newtext = TextUtil.fastReplace(TextUtil.fastReplace(newtext, "- - ", "- "), ". .", ".");
|
||||
newtext = TextUtil.fastReplace(newtext, "CARDNAME", name);
|
||||
textRenderer.drawText(g, name + " " + (name.length() > 1 ? cId : "") + optionalCostString + "\n" + (newtext.length() > 1 ? newtext : ""),
|
||||
FONT, foreColor, x, y, w, h, y, h, true, Align.left, true);
|
||||
|
||||
} else {
|
||||
@@ -409,10 +412,13 @@ public class VStack extends FDropDown {
|
||||
if(newtext.equals("\n"+name))
|
||||
textRenderer.drawText(g, name + " " + cId + optionalCostString, FONT, foreColor, x, y, w, h, y, h, true, Align.left, true);
|
||||
else {
|
||||
newtext = TextUtil.fastReplace(newtext, " ", " ");
|
||||
newtext = TextUtil.fastReplace(TextUtil.fastReplace(newtext,name+" -","-"), "\n ", "\n");
|
||||
newtext = "\n"+ TextUtil.fastReplace(newtext.trim(),"--","-");
|
||||
newtext = TextUtil.fastReplace(newtext, "- - ", "- ");
|
||||
textRenderer.drawText(g, name+" "+cId+newtext, FONT, foreColor, x, y, w, h, y, h, true, Align.left, true);
|
||||
newtext = TextUtil.fastReplace(TextUtil.fastReplace(newtext, " and .", ".")," .", ".");
|
||||
newtext = TextUtil.fastReplace(TextUtil.fastReplace(newtext, "- - ", "- "), ". .", ".");
|
||||
newtext = TextUtil.fastReplace(newtext, "CARDNAME", name);
|
||||
textRenderer.drawText(g, name+" "+cId + optionalCostString +newtext, FONT, foreColor, x, y, w, h, y, h, true, Align.left, true);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user