update TextraTypist

This commit is contained in:
Anthony Calosa
2023-02-11 12:26:52 +08:00
parent a96827a807
commit e3426d15f2
10 changed files with 31 additions and 32 deletions

View File

@@ -175,7 +175,7 @@ public class SaveLoadScene extends UIScene {
previewImage.setVisible(true); previewImage.setVisible(true);
previewDate.setVisible(true); previewDate.setVisible(true);
if (header.saveDate != null) if (header.saveDate != null)
previewDate.setText("{Scale=98%}"+DateFormat.getDateInstance().format(header.saveDate) + " " + DateFormat.getTimeInstance(DateFormat.SHORT).format(header.saveDate)); previewDate.setText("[%99]"+DateFormat.getDateInstance(DateFormat.SHORT).format(header.saveDate) + " " + DateFormat.getTimeInstance(DateFormat.SHORT).format(header.saveDate));
else else
previewDate.setText(""); previewDate.setText("");
if (header.name.contains(Character.toString(ASCII_179))) { if (header.name.contains(Character.toString(ASCII_179))) {

View File

@@ -122,12 +122,12 @@ public class GameHUD extends Stage {
lifePoints = ui.findActor("lifePoints"); lifePoints = ui.findActor("lifePoints");
shards = ui.findActor("shards"); shards = ui.findActor("shards");
money = ui.findActor("money"); money = ui.findActor("money");
shards.setText("{Scale=80%}0/0"); shards.setText("[%80]0/0");
lifePoints.setText("{Scale=80%}20/20"); lifePoints.setText("[%80]20/20");
AdventurePlayer.current().onLifeChange(() -> lifePoints.setText("{Scale=80%}"+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife())); AdventurePlayer.current().onLifeChange(() -> lifePoints.setText("[%80]"+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife()));
AdventurePlayer.current().onShardsChange(() -> shards.setText("{Scale=80%}"+AdventurePlayer.current().getShards())); AdventurePlayer.current().onShardsChange(() -> shards.setText("[%80]"+AdventurePlayer.current().getShards()));
WorldSave.getCurrentSave().getPlayer().onGoldChange(() -> money.setText("{Scale=80%}"+String.valueOf(AdventurePlayer.current().getGold()))); WorldSave.getCurrentSave().getPlayer().onGoldChange(() -> money.setText("[%80]"+String.valueOf(AdventurePlayer.current().getGold())));
addActor(ui); addActor(ui);
addActor(miniMapPlayer); addActor(miniMapPlayer);
console = new Console(); console = new Console();

View File

@@ -395,9 +395,8 @@ public class Controls {
{ {
if(textraFont==null) if(textraFont==null)
{ {
textraFont=new Font(getSkin().getFont("default")); textraFont=new Font(getSkin().getFont("default"), 0f, 1.5f, 0f, 0f);
textraFont.addAtlas(Config.instance().getAtlas(Paths.ITEMS_ATLAS)); textraFont.addAtlas(Config.instance().getAtlas(Paths.ITEMS_ATLAS));
textraFont.adjustLineHeight(0.8f);//not sure why this is needed maybe the font is bad
} }
return textraFont; return textraFont;
} }

View File

@@ -44,13 +44,13 @@ public enum KeyBinding {
public String getLabelText(boolean pressed) { public String getLabelText(boolean pressed) {
if(Controllers.getCurrent()!=null) if(Controllers.getCurrent()!=null)
{ {
return "{Scale=125%}[+"+controllerPrefix+Input.Keys.toString(bindingController).replace(" Button","")+(pressed?"_pressed]":"]"); return "[%125][+"+controllerPrefix+Input.Keys.toString(bindingController).replace(" Button","")+(pressed?"_pressed]":"]");
} }
else else
{ {
if(GuiBase.isAndroid()) if(GuiBase.isAndroid())
return ""; return "";
return "{Scale=125%}[+"+Input.Keys.toString(binding)+(pressed?"_pressed]":"]"); return "[%125][+"+Input.Keys.toString(binding)+(pressed?"_pressed]":"]");
} }
} }

View File

@@ -43,7 +43,7 @@
<dependency> <dependency>
<groupId>com.github.tommyettinger</groupId> <groupId>com.github.tommyettinger</groupId>
<artifactId>textratypist</artifactId> <artifactId>textratypist</artifactId>
<version>0.7.2</version> <version>0.7.6</version>
</dependency> </dependency>
<dependency> <dependency>
<groupId>com.thoughtworks.xstream</groupId> <groupId>com.thoughtworks.xstream</groupId>

View File

@@ -86,18 +86,18 @@
"type": "TextButton", "type": "TextButton",
"name": "exittoworldmap", "name": "exittoworldmap",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+ExitToWorldMap]", "text": "[%125][+ExitToWorldMap]",
"binding": "ExitToWorldMap", "binding": "ExitToWorldMap",
"width": 48, "width": 48,
"height": 36, "height": 36,
"x": 424, "x": 424,
"y": 66 "y": 66
} },
{ {
"type": "TextButton", "type": "TextButton",
"name": "deck", "name": "deck",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Deck]", "text": "[%125][+Deck]",
"binding": "Deck", "binding": "Deck",
"width": 48, "width": 48,
"height": 36, "height": 36,
@@ -108,7 +108,7 @@
"type": "TextButton", "type": "TextButton",
"name": "inventory", "name": "inventory",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Item]", "text": "[%125][+Item]",
"binding": "Inventory", "binding": "Inventory",
"width": 48, "width": 48,
"height": 36, "height": 36,
@@ -120,7 +120,7 @@
"type": "TextButton", "type": "TextButton",
"name": "statistic", "name": "statistic",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Status]", "text": "[%125][+Status]",
"binding": "Status", "binding": "Status",
"width": 48, "width": 48,
"height": 36, "height": 36,
@@ -131,7 +131,7 @@
"type": "TextButton", "type": "TextButton",
"name": "menu", "name": "menu",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Menu]", "text": "[%125][+Menu]",
"binding": "Menu", "binding": "Menu",
"width": 48, "width": 48,
"height": 36, "height": 36,
@@ -141,7 +141,7 @@
{ {
"type": "TextButton", "type": "TextButton",
"name": "openmap", "name": "openmap",
"text": "{Scale=80%}tr(lblZoom)", "text": "[=][%150]tr(lblZoom)",
"binding": "Map", "binding": "Map",
"width": 80, "width": 80,
"height": 18, "height": 18,

View File

@@ -86,7 +86,7 @@
"type": "TextButton", "type": "TextButton",
"name": "deck", "name": "deck",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Deck]", "text": "[%125][+Deck]",
"binding": "Deck", "binding": "Deck",
"width": 64, "width": 64,
"height": 36, "height": 36,
@@ -97,7 +97,7 @@
"type": "TextButton", "type": "TextButton",
"name": "inventory", "name": "inventory",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Item]", "text": "[%125][+Item]",
"binding": "Inventory", "binding": "Inventory",
"width": 64, "width": 64,
"height": 36, "height": 36,
@@ -109,7 +109,7 @@
"type": "TextButton", "type": "TextButton",
"name": "statistic", "name": "statistic",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Status]", "text": "[%125][+Status]",
"binding": "Status", "binding": "Status",
"width": 64, "width": 64,
"height": 36, "height": 36,
@@ -120,7 +120,7 @@
"type": "TextButton", "type": "TextButton",
"name": "menu", "name": "menu",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Menu]", "text": "[%125][+Menu]",
"binding": "Menu", "binding": "Menu",
"width": 64, "width": 64,
"height": 36, "height": 36,
@@ -130,7 +130,7 @@
{ {
"type": "TextButton", "type": "TextButton",
"name": "openmap", "name": "openmap",
"text": "{Scale=80%}tr(lblZoom)", "text": "[=][%150]tr(lblZoom)",
"binding": "Map", "binding": "Map",
"width": 80, "width": 80,
"height": 18, "height": 18,
@@ -141,7 +141,7 @@
"type": "TextButton", "type": "TextButton",
"name": "exittoworldmap", "name": "exittoworldmap",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+ExitToWorldMap]", "text": "[%125][+ExitToWorldMap]",
"binding": "ExitToWorldMap", "binding": "ExitToWorldMap",
"width": 64, "width": 64,
"height": 32, "height": 32,

View File

@@ -85,7 +85,7 @@
"type": "TextButton", "type": "TextButton",
"name": "deck", "name": "deck",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Deck]", "text": "[%125][+Deck]",
"binding": "Deck", "binding": "Deck",
"width": 64, "width": 64,
"height": 32, "height": 32,
@@ -96,7 +96,7 @@
"type": "TextButton", "type": "TextButton",
"name": "inventory", "name": "inventory",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Item]", "text": "[%125][+Item]",
"binding": "Inventory", "binding": "Inventory",
"width": 64, "width": 64,
"height": 32, "height": 32,
@@ -108,7 +108,7 @@
"type": "TextButton", "type": "TextButton",
"name": "statistic", "name": "statistic",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Status]", "text": "[%125][+Status]",
"binding": "Status", "binding": "Status",
"width": 64, "width": 64,
"height": 32, "height": 32,
@@ -119,7 +119,7 @@
"type": "TextButton", "type": "TextButton",
"name": "menu", "name": "menu",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+Menu]", "text": "[%125][+Menu]",
"binding": "Menu", "binding": "Menu",
"width": 64, "width": 64,
"height": 32, "height": 32,
@@ -129,7 +129,7 @@
{ {
"type": "TextButton", "type": "TextButton",
"name": "openmap", "name": "openmap",
"text": "{Scale=80%}tr(lblZoom)", "text": "[=][%150]tr(lblZoom)",
"binding": "Map", "binding": "Map",
"width": 80, "width": 80,
"height": 18, "height": 18,
@@ -140,7 +140,7 @@
"type": "TextButton", "type": "TextButton",
"name": "exittoworldmap", "name": "exittoworldmap",
"style":"menu", "style":"menu",
"text": "{Scale=200%}[+ExitToWorldMap]", "text": "[%125][+ExitToWorldMap]",
"binding": "ExitToWorldMap", "binding": "ExitToWorldMap",
"width": 64, "width": 64,
"height": 32, "height": 32,

View File

@@ -21,7 +21,7 @@
{ {
"type": "Label", "type": "Label",
"name" : "titleL", "name" : "titleL",
"text": "{SIZE=150%}[BLACK]tr(lblCreateACharacter)", "text": "[%150][BLACK]tr(lblCreateACharacter)",
"width": 128, "width": 128,
"height": 16, "height": 16,
"scale": 2, "scale": 2,

View File

@@ -21,7 +21,7 @@
{ {
"type": "Label", "type": "Label",
"name" : "titleL", "name" : "titleL",
"text": "{SIZE=150%}[BLACK]tr(lblCreateACharacter)", "text": "[%150][BLACK]tr(lblCreateACharacter)",
"width": 128, "width": 128,
"height": 32, "height": 32,
"scale": 2, "scale": 2,