mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 12:18:00 +00:00
fix text/effect/map layout
- revert textratypist to 0.7.2 to fix effect/map dialog - update GameHUD
This commit is contained in:
@@ -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("[%99]"+DateFormat.getDateInstance(DateFormat.SHORT).format(header.saveDate) + " " + DateFormat.getTimeInstance(DateFormat.SHORT).format(header.saveDate));
|
previewDate.setText("[%98]"+DateFormat.getDateInstance().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))) {
|
||||||
|
|||||||
@@ -122,12 +122,13 @@ 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("[%80]0/0");
|
shards.setText("[%95][+Shards] 0");
|
||||||
lifePoints.setText("[%80]20/20");
|
money.setText("[%95][+Gold] ");
|
||||||
AdventurePlayer.current().onLifeChange(() -> lifePoints.setText("[%80]"+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife()));
|
lifePoints.setText("[%95][+Life] 20/20");
|
||||||
AdventurePlayer.current().onShardsChange(() -> shards.setText("[%80]"+AdventurePlayer.current().getShards()));
|
AdventurePlayer.current().onLifeChange(() -> lifePoints.setText("[%95][+Life] "+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife()));
|
||||||
|
AdventurePlayer.current().onShardsChange(() -> shards.setText("[%95][+Shards] "+AdventurePlayer.current().getShards()));
|
||||||
|
|
||||||
WorldSave.getCurrentSave().getPlayer().onGoldChange(() -> money.setText("[%80]"+String.valueOf(AdventurePlayer.current().getGold())));
|
WorldSave.getCurrentSave().getPlayer().onGoldChange(() -> money.setText("[%95][+Gold] "+String.valueOf(AdventurePlayer.current().getGold())));
|
||||||
addActor(ui);
|
addActor(ui);
|
||||||
addActor(miniMapPlayer);
|
addActor(miniMapPlayer);
|
||||||
console = new Console();
|
console = new Console();
|
||||||
@@ -247,12 +248,12 @@ public class GameHUD extends Stage {
|
|||||||
//colored lifepoints
|
//colored lifepoints
|
||||||
if (Current.player().getLife() >= Current.player().getMaxLife()) {
|
if (Current.player().getLife() >= Current.player().getMaxLife()) {
|
||||||
//color green if max life
|
//color green if max life
|
||||||
lifePoints.setColor(Color.GREEN);
|
lifePoints.setText("[%95][+Life] [GREEN]"+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife());
|
||||||
} else if (Current.player().getLife() <= 5) {
|
} else if (Current.player().getLife() <= 5) {
|
||||||
//color red if critical
|
//color red if critical
|
||||||
lifePoints.setColor(Color.RED);
|
lifePoints.setText("[%95][+Life] [RED]"+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife());
|
||||||
} else {
|
} else {
|
||||||
lifePoints.setColor(Color.WHITE);
|
lifePoints.setText("[%95][+Life] "+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -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.6</version>
|
<version>0.7.2</version>
|
||||||
</dependency>
|
</dependency>
|
||||||
<dependency>
|
<dependency>
|
||||||
<groupId>com.thoughtworks.xstream</groupId>
|
<groupId>com.thoughtworks.xstream</groupId>
|
||||||
|
|||||||
@@ -61,7 +61,7 @@
|
|||||||
"font": "default",
|
"font": "default",
|
||||||
"width": 64,
|
"width": 64,
|
||||||
"height": 16,
|
"height": 16,
|
||||||
"x": 442,
|
"x": 427,
|
||||||
"y": 56
|
"y": 56
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"font": "default",
|
"font": "default",
|
||||||
"width": 64,
|
"width": 64,
|
||||||
"height": 16,
|
"height": 16,
|
||||||
"x": 442,
|
"x": 427,
|
||||||
"y": 73
|
"y": 73
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
"font": "default",
|
"font": "default",
|
||||||
"width": 64,
|
"width": 64,
|
||||||
"height": 16,
|
"height": 16,
|
||||||
"x": 442,
|
"x": 427,
|
||||||
"y": 90
|
"y": 90
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -141,7 +141,7 @@
|
|||||||
{
|
{
|
||||||
"type": "TextButton",
|
"type": "TextButton",
|
||||||
"name": "openmap",
|
"name": "openmap",
|
||||||
"text": "[=][%150]tr(lblZoom)",
|
"text": "[%80]tr(lblZoom)",
|
||||||
"binding": "Map",
|
"binding": "Map",
|
||||||
"width": 80,
|
"width": 80,
|
||||||
"height": 18,
|
"height": 18,
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 8.9 KiB After Width: | Height: | Size: 2.7 KiB |
@@ -61,7 +61,7 @@
|
|||||||
"font": "default",
|
"font": "default",
|
||||||
"width": 64,
|
"width": 64,
|
||||||
"height": 16,
|
"height": 16,
|
||||||
"x": 442,
|
"x": 419,
|
||||||
"y": 56
|
"y": 56
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -70,7 +70,7 @@
|
|||||||
"font": "default",
|
"font": "default",
|
||||||
"width": 64,
|
"width": 64,
|
||||||
"height": 16,
|
"height": 16,
|
||||||
"x": 442,
|
"x": 419,
|
||||||
"y": 73
|
"y": 73
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -79,7 +79,7 @@
|
|||||||
"font": "default",
|
"font": "default",
|
||||||
"width": 64,
|
"width": 64,
|
||||||
"height": 16,
|
"height": 16,
|
||||||
"x": 442,
|
"x": 419,
|
||||||
"y": 90
|
"y": 90
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -130,7 +130,7 @@
|
|||||||
{
|
{
|
||||||
"type": "TextButton",
|
"type": "TextButton",
|
||||||
"name": "openmap",
|
"name": "openmap",
|
||||||
"text": "[=][%150]tr(lblZoom)",
|
"text": "[%80]tr(lblZoom)",
|
||||||
"binding": "Map",
|
"binding": "Map",
|
||||||
"width": 80,
|
"width": 80,
|
||||||
"height": 18,
|
"height": 18,
|
||||||
|
|||||||
@@ -60,7 +60,7 @@
|
|||||||
"name": "lifePoints",
|
"name": "lifePoints",
|
||||||
"width": 48,
|
"width": 48,
|
||||||
"height": 3,
|
"height": 3,
|
||||||
"x": 234,
|
"x": 209,
|
||||||
"y": 62
|
"y": 62
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -69,7 +69,7 @@
|
|||||||
"font": "default",
|
"font": "default",
|
||||||
"width": 48,
|
"width": 48,
|
||||||
"height": 3,
|
"height": 3,
|
||||||
"x": 234,
|
"x": 209,
|
||||||
"y": 76
|
"y": 76
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -78,7 +78,7 @@
|
|||||||
"font": "default",
|
"font": "default",
|
||||||
"width": 48,
|
"width": 48,
|
||||||
"height": 3,
|
"height": 3,
|
||||||
"x": 234,
|
"x": 209,
|
||||||
"y": 90
|
"y": 90
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
@@ -129,7 +129,7 @@
|
|||||||
{
|
{
|
||||||
"type": "TextButton",
|
"type": "TextButton",
|
||||||
"name": "openmap",
|
"name": "openmap",
|
||||||
"text": "[=][%150]tr(lblZoom)",
|
"text": "[%80]tr(lblZoom)",
|
||||||
"binding": "Map",
|
"binding": "Map",
|
||||||
"width": 80,
|
"width": 80,
|
||||||
"height": 18,
|
"height": 18,
|
||||||
|
|||||||
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB After Width: | Height: | Size: 2.4 KiB |
Reference in New Issue
Block a user