mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 04:08:01 +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);
|
||||
previewDate.setVisible(true);
|
||||
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
|
||||
previewDate.setText("");
|
||||
if (header.name.contains(Character.toString(ASCII_179))) {
|
||||
|
||||
@@ -122,12 +122,13 @@ public class GameHUD extends Stage {
|
||||
lifePoints = ui.findActor("lifePoints");
|
||||
shards = ui.findActor("shards");
|
||||
money = ui.findActor("money");
|
||||
shards.setText("[%80]0/0");
|
||||
lifePoints.setText("[%80]20/20");
|
||||
AdventurePlayer.current().onLifeChange(() -> lifePoints.setText("[%80]"+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife()));
|
||||
AdventurePlayer.current().onShardsChange(() -> shards.setText("[%80]"+AdventurePlayer.current().getShards()));
|
||||
shards.setText("[%95][+Shards] 0");
|
||||
money.setText("[%95][+Gold] ");
|
||||
lifePoints.setText("[%95][+Life] 20/20");
|
||||
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(miniMapPlayer);
|
||||
console = new Console();
|
||||
@@ -247,12 +248,12 @@ public class GameHUD extends Stage {
|
||||
//colored lifepoints
|
||||
if (Current.player().getLife() >= Current.player().getMaxLife()) {
|
||||
//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) {
|
||||
//color red if critical
|
||||
lifePoints.setColor(Color.RED);
|
||||
lifePoints.setText("[%95][+Life] [RED]"+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife());
|
||||
} else {
|
||||
lifePoints.setColor(Color.WHITE);
|
||||
lifePoints.setText("[%95][+Life] "+AdventurePlayer.current().getLife() + "/" + AdventurePlayer.current().getMaxLife());
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -43,7 +43,7 @@
|
||||
<dependency>
|
||||
<groupId>com.github.tommyettinger</groupId>
|
||||
<artifactId>textratypist</artifactId>
|
||||
<version>0.7.6</version>
|
||||
<version>0.7.2</version>
|
||||
</dependency>
|
||||
<dependency>
|
||||
<groupId>com.thoughtworks.xstream</groupId>
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
"font": "default",
|
||||
"width": 64,
|
||||
"height": 16,
|
||||
"x": 442,
|
||||
"x": 427,
|
||||
"y": 56
|
||||
},
|
||||
{
|
||||
@@ -70,7 +70,7 @@
|
||||
"font": "default",
|
||||
"width": 64,
|
||||
"height": 16,
|
||||
"x": 442,
|
||||
"x": 427,
|
||||
"y": 73
|
||||
},
|
||||
{
|
||||
@@ -79,7 +79,7 @@
|
||||
"font": "default",
|
||||
"width": 64,
|
||||
"height": 16,
|
||||
"x": 442,
|
||||
"x": 427,
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
@@ -141,7 +141,7 @@
|
||||
{
|
||||
"type": "TextButton",
|
||||
"name": "openmap",
|
||||
"text": "[=][%150]tr(lblZoom)",
|
||||
"text": "[%80]tr(lblZoom)",
|
||||
"binding": "Map",
|
||||
"width": 80,
|
||||
"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",
|
||||
"width": 64,
|
||||
"height": 16,
|
||||
"x": 442,
|
||||
"x": 419,
|
||||
"y": 56
|
||||
},
|
||||
{
|
||||
@@ -70,7 +70,7 @@
|
||||
"font": "default",
|
||||
"width": 64,
|
||||
"height": 16,
|
||||
"x": 442,
|
||||
"x": 419,
|
||||
"y": 73
|
||||
},
|
||||
{
|
||||
@@ -79,7 +79,7 @@
|
||||
"font": "default",
|
||||
"width": 64,
|
||||
"height": 16,
|
||||
"x": 442,
|
||||
"x": 419,
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
@@ -130,7 +130,7 @@
|
||||
{
|
||||
"type": "TextButton",
|
||||
"name": "openmap",
|
||||
"text": "[=][%150]tr(lblZoom)",
|
||||
"text": "[%80]tr(lblZoom)",
|
||||
"binding": "Map",
|
||||
"width": 80,
|
||||
"height": 18,
|
||||
|
||||
@@ -60,7 +60,7 @@
|
||||
"name": "lifePoints",
|
||||
"width": 48,
|
||||
"height": 3,
|
||||
"x": 234,
|
||||
"x": 209,
|
||||
"y": 62
|
||||
},
|
||||
{
|
||||
@@ -69,7 +69,7 @@
|
||||
"font": "default",
|
||||
"width": 48,
|
||||
"height": 3,
|
||||
"x": 234,
|
||||
"x": 209,
|
||||
"y": 76
|
||||
},
|
||||
{
|
||||
@@ -78,7 +78,7 @@
|
||||
"font": "default",
|
||||
"width": 48,
|
||||
"height": 3,
|
||||
"x": 234,
|
||||
"x": 209,
|
||||
"y": 90
|
||||
},
|
||||
{
|
||||
@@ -129,7 +129,7 @@
|
||||
{
|
||||
"type": "TextButton",
|
||||
"name": "openmap",
|
||||
"text": "[=][%150]tr(lblZoom)",
|
||||
"text": "[%80]tr(lblZoom)",
|
||||
"binding": "Map",
|
||||
"width": 80,
|
||||
"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