v2.1.0: fixed text overflows in new shopkeeper UI

This commit is contained in:
Evan Debenham
2023-05-23 11:58:36 -04:00
parent c368a79218
commit c57a9dd8ee
@@ -172,7 +172,9 @@ public class Shopkeeper extends NPC {
options[i++] = Messages.get(Shopkeeper.this, "sell"); options[i++] = Messages.get(Shopkeeper.this, "sell");
options[i++] = Messages.get(Shopkeeper.this, "talk"); options[i++] = Messages.get(Shopkeeper.this, "talk");
for (Item item : buybackItems){ for (Item item : buybackItems){
options[i++] = Messages.get(Heap.class, "for_sale", item.value(), Messages.titleCase(item.title())); options[i] = Messages.get(Heap.class, "for_sale", item.value(), Messages.titleCase(item.title()));
if (options[i].length() > 26) options[i] = options[i].substring(0, 23) + "...";
i++;
} }
GameScene.show(new WndOptions(sprite(), Messages.titleCase(name()), description(), options){ GameScene.show(new WndOptions(sprite(), Messages.titleCase(name()), description(), options){
@Override @Override