Merge pull request #5982 from kevlahnota/master2

update PlayerStatisticScene, BlurUtils
This commit is contained in:
kevlahnota
2024-08-24 12:59:14 +08:00
committed by GitHub
5 changed files with 19 additions and 11 deletions

View File

@@ -223,6 +223,10 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
return name;
}
public Boolean isFemale() {
return isFemale;
}
public float getWorldPosX() {
return worldPosX;
}

View File

@@ -12,6 +12,7 @@ import com.badlogic.gdx.utils.Align;
import com.badlogic.gdx.utils.Scaling;
import com.github.tommyettinger.textra.TextraButton;
import com.github.tommyettinger.textra.TextraLabel;
import com.github.tommyettinger.textra.TypingLabel;
import forge.Forge;
import forge.adventure.character.EnemySprite;
import forge.adventure.data.EnemyData;
@@ -44,7 +45,8 @@ public class PlayerStatisticScene extends UIScene {
TextraLabel wins, totalWins, eventWins, eventMatchWins;
TextraLabel loss, totalLoss, eventLosses, eventMatchLosses;
TextraLabel winloss, lossWinRatio, eventLossWinRatio, eventMatchLossWinRatio;
TextraLabel playerName, headerAchievements, headerAvatar, headerName, headerWinLoss;
TextraLabel headerAchievements, headerAvatar, headerName, headerWinLoss;
TypingLabel playerName;
TextraButton back, toggleAward;
private final Table scrollContainer, achievementContainer;
TextraLabel blessingScroll;
@@ -196,7 +198,9 @@ public class PlayerStatisticScene extends UIScene {
scrollContainer.clear();
if (playerName != null) {
playerName.setText(GamePlayerUtil.getGuiPlayer().getName());
String gender = Current.player().isFemale() ? "{GRADIENT=MAGENTA;MAUVE;1;1}\u2640{ENDGRADIENT}[BLACK] " : "{GRADIENT=CYAN;BLUE;1;1}\u2642{ENDGRADIENT}[BLACK] ";
playerName.setText(gender + GamePlayerUtil.getGuiPlayer().getName());
playerName.skipToTheEnd();
}
if (avatar != null) {
avatar.setDrawable(new TextureRegionDrawable(Current.player().avatar()));

View File

@@ -275,7 +275,7 @@ public class BlurUtils {
int y = (int)(pixmap.getHeight()*0.35f);
int width = pixmap.getWidth()-x;
int height = pixmap.getHeight()-y;
return blur(pixmap, x/2, y/2, width, height, 0, 0, width, height, radius, iterations, disposePixmap);
return blur(pixmap, x/2, y/2, width, height, 0, 0, width/4, height/4, radius, iterations, disposePixmap);
}
/**

View File

@@ -37,7 +37,7 @@
{
"type": "Image",
"name": "avatar",
"x": 321,
"x": 384,
"y": 28,
"width": 64,
"height": 64
@@ -46,7 +46,7 @@
"type": "Image",
"name": "colorFrame",
"image": "ui/colorC.png",
"x": 305,
"x": 368,
"y": 45,
"width": 64,
"height": 64
@@ -137,9 +137,9 @@
"y": 224
},
{
"type": "Label",
"type": "TypingLabel",
"name": "playerName",
"x": 394,
"x": 310,
"y": 20,
"width": 80,
"height": 24,
@@ -150,7 +150,7 @@
"name": "lifePoints",
"width": 64,
"height": 16,
"x": 394,
"x": 310,
"y": 40
},
{
@@ -158,7 +158,7 @@
"name": "money",
"width": 64,
"height": 16,
"x": 394,
"x": 310,
"y": 80
},
{
@@ -166,7 +166,7 @@
"name": "shards",
"width": 64,
"height": 16,
"x": 394,
"x": 310,
"y": 60
},
{

View File

@@ -136,7 +136,7 @@
"y": 440
},
{
"type": "Label",
"type": "TypingLabel",
"name": "playerName",
"x": 98,
"y": 4,