mirror of
https://github.com/Card-Forge/forge.git
synced 2025-11-19 20:28:00 +00:00
Added statistic
This commit is contained in:
@@ -4,7 +4,7 @@ import com.badlogic.gdx.math.Vector2;
|
||||
import forge.adventure.stage.GameStage;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.Current;
|
||||
import forge.adventure.world.AdventurePlayer;
|
||||
import forge.adventure.player.AdventurePlayer;
|
||||
|
||||
/**
|
||||
* Class that will represent the player sprite on the map
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
package forge.adventure.world;
|
||||
package forge.adventure.player;
|
||||
|
||||
import com.badlogic.gdx.files.FileHandle;
|
||||
import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
@@ -6,6 +6,7 @@ import com.google.common.collect.Lists;
|
||||
import forge.adventure.data.DifficultyData;
|
||||
import forge.adventure.data.HeroListData;
|
||||
import forge.adventure.util.*;
|
||||
import forge.adventure.world.WorldSave;
|
||||
import forge.deck.CardPool;
|
||||
import forge.deck.Deck;
|
||||
import forge.deck.DeckSection;
|
||||
@@ -31,8 +32,11 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
|
||||
private int maxLife=20;
|
||||
private int life=20;
|
||||
private int selectedDeckIndex=0;
|
||||
private PlayerStatistic statistic=new PlayerStatistic();
|
||||
private Deck[] decks=new Deck[NUMBER_OF_DECKS];
|
||||
private final DifficultyData difficultyData=new DifficultyData();
|
||||
|
||||
|
||||
public AdventurePlayer()
|
||||
{
|
||||
|
||||
@@ -41,9 +45,12 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
|
||||
decks[i]=new Deck("Empty Deck");
|
||||
}
|
||||
}
|
||||
|
||||
public PlayerStatistic getStatistic(){return statistic;}
|
||||
|
||||
static public AdventurePlayer current()
|
||||
{
|
||||
return WorldSave.currentSave.getPlayer();
|
||||
return WorldSave.getCurrentSave().getPlayer();
|
||||
}
|
||||
private final CardPool cards=new CardPool();
|
||||
private final ItemPool<InventoryItem> newCards=new ItemPool<>(InventoryItem.class);
|
||||
@@ -67,6 +74,7 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
|
||||
heroRace = race;
|
||||
isFemale = !male;
|
||||
name = n;
|
||||
statistic.clear();
|
||||
newCards.clear();
|
||||
onGoldChangeList.emit();
|
||||
onLifeTotalChangeList.emit();
|
||||
@@ -118,6 +126,8 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
|
||||
@Override
|
||||
public void load(SaveFileData data) {
|
||||
|
||||
|
||||
this.statistic.load(data.readSubData("statistic"));
|
||||
this.difficultyData.startingLife=data.readInt("startingLife");
|
||||
this.difficultyData.staringMoney=data.readInt("staringMoney");
|
||||
this.difficultyData.startingDifficulty=data.readBool("startingDifficulty");
|
||||
@@ -174,6 +184,7 @@ public class AdventurePlayer implements Serializable, SaveFileContent {
|
||||
SaveFileData data= new SaveFileData();
|
||||
|
||||
|
||||
data.store("statistic",this.statistic.save());
|
||||
data.store("startingLife",this.difficultyData.startingLife);
|
||||
data.store("staringMoney",this.difficultyData.staringMoney);
|
||||
data.store("startingDifficulty",this.difficultyData.startingDifficulty);
|
||||
@@ -0,0 +1,83 @@
|
||||
package forge.adventure.player;
|
||||
|
||||
import forge.adventure.util.SaveFileContent;
|
||||
import forge.adventure.util.SaveFileData;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.Map;
|
||||
|
||||
public class PlayerStatistic implements SaveFileContent {
|
||||
|
||||
HashMap<String, Pair<Integer,Integer>> winLossRecord=new HashMap<>();
|
||||
int secondPlayed=0;
|
||||
|
||||
public HashMap<String, Pair<Integer,Integer>> getWinLossRecord()
|
||||
{
|
||||
return winLossRecord;
|
||||
}
|
||||
public int totalWins()
|
||||
{
|
||||
int wins=0;
|
||||
for(Map.Entry<String, Pair<Integer, Integer>> value:winLossRecord.entrySet())
|
||||
{
|
||||
wins+=value.getValue().getLeft();
|
||||
}
|
||||
return wins;
|
||||
}
|
||||
public int totalLoss()
|
||||
{
|
||||
int loss=0;
|
||||
for(Map.Entry<String, Pair<Integer, Integer>> value:winLossRecord.entrySet())
|
||||
{
|
||||
loss+=value.getValue().getRight();
|
||||
}
|
||||
return loss;
|
||||
}
|
||||
public float winLossRatio()
|
||||
{
|
||||
return (float) totalWins()/(float)totalLoss();
|
||||
}
|
||||
public int getPlayTime()
|
||||
{
|
||||
return secondPlayed;
|
||||
}
|
||||
@Override
|
||||
public void load(SaveFileData data) {
|
||||
|
||||
winLossRecord = (HashMap<String, Pair<Integer, Integer>>) data.readObject("winLossRecord");
|
||||
}
|
||||
|
||||
public void setResult(String enemy,boolean win)
|
||||
{
|
||||
if(!winLossRecord.containsKey(enemy))
|
||||
{
|
||||
if(win)
|
||||
winLossRecord.put(enemy,Pair.of(1,0));
|
||||
else
|
||||
winLossRecord.put(enemy,Pair.of(0,1));
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
if(win)
|
||||
winLossRecord.put(enemy,Pair.of(winLossRecord.get(enemy).getLeft()+1,winLossRecord.get(enemy).getRight()));
|
||||
else
|
||||
winLossRecord.put(enemy,Pair.of(winLossRecord.get(enemy).getLeft(),winLossRecord.get(enemy).getRight()+1));
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public SaveFileData save() {
|
||||
|
||||
SaveFileData data=new SaveFileData();
|
||||
data.storeObject("winLossRecord",winLossRecord);
|
||||
return data;
|
||||
}
|
||||
|
||||
|
||||
public void clear() {
|
||||
winLossRecord.clear();
|
||||
}
|
||||
}
|
||||
@@ -1,4 +1,4 @@
|
||||
package forge.adventure.world;
|
||||
package forge.adventure.pointofintrest;
|
||||
|
||||
import com.badlogic.gdx.graphics.g2d.Sprite;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
@@ -1,4 +1,4 @@
|
||||
package forge.adventure.world;
|
||||
package forge.adventure.pointofintrest;
|
||||
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
@@ -1,4 +1,4 @@
|
||||
package forge.adventure.world;
|
||||
package forge.adventure.pointofintrest;
|
||||
|
||||
import forge.adventure.util.SaveFileContent;
|
||||
import forge.adventure.util.SaveFileData;
|
||||
@@ -17,7 +17,7 @@ public class PointOfInterestMap implements SaveFileContent {
|
||||
int chunkSize;
|
||||
private List<PointOfInterest>[][] mapObjects;
|
||||
|
||||
PointOfInterestMap(int chunkSize, int tiles, int numberOfChunksX, int numberOfChunksY) {
|
||||
public PointOfInterestMap(int chunkSize, int tiles, int numberOfChunksX, int numberOfChunksY) {
|
||||
this.tileSize = tiles;
|
||||
this.chunkSize = chunkSize;
|
||||
this.numberOfChunksX = numberOfChunksX;
|
||||
@@ -6,7 +6,7 @@ import com.google.common.base.Function;
|
||||
import forge.Forge;
|
||||
import forge.Graphics;
|
||||
import forge.adventure.AdventureApplicationAdapter;
|
||||
import forge.adventure.world.AdventurePlayer;
|
||||
import forge.adventure.player.AdventurePlayer;
|
||||
import forge.assets.FImage;
|
||||
import forge.assets.FSkinFont;
|
||||
import forge.assets.FSkinImage;
|
||||
|
||||
@@ -10,7 +10,7 @@ import com.badlogic.gdx.utils.IntMap;
|
||||
import forge.adventure.AdventureApplicationAdapter;
|
||||
import forge.adventure.util.Controls;
|
||||
import forge.adventure.util.Current;
|
||||
import forge.adventure.world.AdventurePlayer;
|
||||
import forge.adventure.player.AdventurePlayer;
|
||||
|
||||
public class DeckSelectScene extends UIScene {
|
||||
private final IntMap<TextButton> buttons = new IntMap<>();
|
||||
|
||||
@@ -7,7 +7,7 @@ import forge.adventure.character.EnemySprite;
|
||||
import forge.adventure.character.PlayerSprite;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.Current;
|
||||
import forge.adventure.world.AdventurePlayer;
|
||||
import forge.adventure.player.AdventurePlayer;
|
||||
import forge.assets.FSkin;
|
||||
import forge.deck.Deck;
|
||||
import forge.game.GameRules;
|
||||
@@ -48,12 +48,14 @@ public class DuelScene extends ForgeScene {
|
||||
|
||||
public void GameEnd() {
|
||||
boolean winner=humanPlayer == hostedMatch.getGame().getMatch().getWinner();
|
||||
String enemyName=enemy.getData().name;
|
||||
Gdx.app.postRunnable(() -> {
|
||||
SoundSystem.instance.setBackgroundMusic(MusicPlaylist.MENUS); //start background music
|
||||
Scene last= AdventureApplicationAdapter.instance.switchToLast();
|
||||
|
||||
if(last instanceof HudScene)
|
||||
{
|
||||
Current.player().getStatistic().setResult(enemyName,winner);
|
||||
((HudScene)last).stage.setWinner(winner);
|
||||
}
|
||||
});
|
||||
|
||||
@@ -0,0 +1,113 @@
|
||||
package forge.adventure.scene;
|
||||
|
||||
import com.badlogic.gdx.Input;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Image;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Label;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.ScrollPane;
|
||||
import com.badlogic.gdx.scenes.scene2d.ui.Table;
|
||||
import com.badlogic.gdx.scenes.scene2d.utils.TextureRegionDrawable;
|
||||
import com.badlogic.gdx.utils.Align;
|
||||
import forge.adventure.AdventureApplicationAdapter;
|
||||
import forge.adventure.character.EnemySprite;
|
||||
import forge.adventure.data.EnemyData;
|
||||
import forge.adventure.data.WorldData;
|
||||
import forge.adventure.util.Controls;
|
||||
import forge.adventure.util.Current;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
import java.util.Map;
|
||||
|
||||
public class PlayerStatisticScene extends UIScene {
|
||||
|
||||
|
||||
Image avatar;
|
||||
Label totalWins;
|
||||
Label totalLoss;
|
||||
Label lossWinRatio;
|
||||
private Table enemiesGroup;
|
||||
|
||||
public PlayerStatisticScene() {
|
||||
super("ui/statistic.json");
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
public boolean keyPressed(int keycode)
|
||||
{
|
||||
if (keycode == Input.Keys.ESCAPE)
|
||||
{
|
||||
back();
|
||||
}
|
||||
return true;
|
||||
}
|
||||
public boolean back() {
|
||||
AdventureApplicationAdapter.instance.switchToLast();
|
||||
return true;
|
||||
}
|
||||
@Override
|
||||
public void enter() {
|
||||
super.enter();
|
||||
enemiesGroup.clear();
|
||||
if(avatar!=null)
|
||||
{
|
||||
avatar.setDrawable(new TextureRegionDrawable(Current.player().avatar()));
|
||||
}
|
||||
if(totalWins!=null)
|
||||
{
|
||||
totalWins.setText(Current.player().getStatistic().totalWins());
|
||||
}
|
||||
if(totalLoss!=null)
|
||||
{
|
||||
totalLoss.setText(Current.player().getStatistic().totalLoss());
|
||||
}
|
||||
if(lossWinRatio!=null)
|
||||
{
|
||||
lossWinRatio.setText(Float.toString(Current.player().getStatistic().winLossRatio()));
|
||||
}
|
||||
|
||||
for(Map.Entry<String, Pair<Integer,Integer>> entry : Current.player().getStatistic().getWinLossRecord().entrySet())
|
||||
{
|
||||
EnemyData data=WorldData.getEnemy(entry.getKey());
|
||||
if(data==null)continue;
|
||||
Image enemyImage=new Image();
|
||||
enemyImage.setDrawable(new TextureRegionDrawable(new EnemySprite(data).getAvatar()));
|
||||
enemyImage.setSize(8,8);
|
||||
Label name = Controls.newLabel(data.name);
|
||||
|
||||
enemiesGroup.add(enemyImage).align(Align.left).space(2);
|
||||
enemiesGroup.add((data.name)).align(Align.left).space(2);
|
||||
enemiesGroup.add((entry.getValue().getLeft().toString())).align(Align.right).space(2);
|
||||
enemiesGroup.add(("/")).align(Align.right).space(2);
|
||||
enemiesGroup.add((entry.getValue().getRight().toString())).align(Align.right).space(2);
|
||||
enemiesGroup.row().space(5);
|
||||
}
|
||||
|
||||
}
|
||||
@Override
|
||||
public void resLoaded() {
|
||||
super.resLoaded();
|
||||
enemiesGroup = new Table(Controls.GetSkin());
|
||||
|
||||
|
||||
enemiesGroup.row();
|
||||
ui.onButtonPress("return", () -> back());
|
||||
avatar=ui.findActor("avatar");
|
||||
|
||||
totalWins=ui.findActor("totalWins");
|
||||
totalLoss=ui.findActor("totalLoss");
|
||||
lossWinRatio=ui.findActor("lossWinRatio");
|
||||
|
||||
ScrollPane scrollPane = ui.findActor("enemies");
|
||||
scrollPane.setActor(enemiesGroup);
|
||||
}
|
||||
|
||||
@Override
|
||||
public void create() {
|
||||
|
||||
}
|
||||
}
|
||||
@@ -14,8 +14,8 @@ import forge.adventure.util.CardUtil;
|
||||
import forge.adventure.util.Current;
|
||||
import forge.adventure.util.Reward;
|
||||
import forge.adventure.util.RewardActor;
|
||||
import forge.adventure.world.AdventurePlayer;
|
||||
import forge.adventure.world.PointOfInterestChanges;
|
||||
import forge.adventure.player.AdventurePlayer;
|
||||
import forge.adventure.pointofintrest.PointOfInterestChanges;
|
||||
import forge.adventure.world.WorldSave;
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,8 @@ public enum SceneType {
|
||||
RewardScene(new forge.adventure.scene.RewardScene()),
|
||||
InnScene(new forge.adventure.scene.InnScene()),
|
||||
DeckSelectScene(new forge.adventure.scene.DeckSelectScene()),
|
||||
ShopScene(new forge.adventure.scene.ShopScene());
|
||||
ShopScene(new forge.adventure.scene.ShopScene()),
|
||||
PlayerStatisticScene(new forge.adventure.scene.PlayerStatisticScene());
|
||||
|
||||
|
||||
public final forge.adventure.scene.Scene instance;
|
||||
|
||||
@@ -221,10 +221,4 @@ public class SettingsScene extends UIScene {
|
||||
public void create() {
|
||||
|
||||
}
|
||||
|
||||
enum ControlTypes {
|
||||
CheckBox,
|
||||
Slider,
|
||||
Resolution
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1,6 +1,5 @@
|
||||
package forge.adventure.scene;
|
||||
|
||||
import com.badlogic.gdx.scenes.scene2d.Stage;
|
||||
import forge.screens.FScreen;
|
||||
|
||||
/**
|
||||
@@ -10,7 +9,6 @@ import forge.screens.FScreen;
|
||||
public class ShopScene extends ForgeScene {
|
||||
|
||||
AdventureDeckEditor screen;
|
||||
Stage stage;
|
||||
|
||||
public ShopScene() {
|
||||
|
||||
@@ -18,8 +16,6 @@ public class ShopScene extends ForgeScene {
|
||||
|
||||
@Override
|
||||
public void dispose() {
|
||||
if (stage != null)
|
||||
stage.dispose();
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ import forge.adventure.stage.MapStage;
|
||||
import forge.adventure.stage.PointOfInterestMapRenderer;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.TemplateTmxMapLoader;
|
||||
import forge.adventure.world.PointOfInterest;
|
||||
import forge.adventure.pointofintrest.PointOfInterest;
|
||||
import forge.adventure.world.WorldSave;
|
||||
|
||||
/**
|
||||
|
||||
@@ -15,7 +15,7 @@ import forge.adventure.scene.SceneType;
|
||||
import forge.adventure.util.Current;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.UIActor;
|
||||
import forge.adventure.world.AdventurePlayer;
|
||||
import forge.adventure.player.AdventurePlayer;
|
||||
import forge.adventure.world.WorldSave;
|
||||
|
||||
/**
|
||||
@@ -47,6 +47,7 @@ public class GameHUD extends Stage {
|
||||
|
||||
avatar = ui.findActor("avatar");
|
||||
ui.onButtonPress("menu", () -> menu());
|
||||
ui.onButtonPress("statistic",()-> AdventureApplicationAdapter.instance.switchScene(SceneType.PlayerStatisticScene.instance));
|
||||
ui.onButtonPress("deck", () -> openDeck());
|
||||
lifePoints = ui.findActor("lifePoints");
|
||||
lifePoints.setText("20/20");
|
||||
@@ -60,6 +61,10 @@ public class GameHUD extends Stage {
|
||||
WorldSave.getCurrentSave().onLoad(() -> enter());
|
||||
}
|
||||
|
||||
private void statistic() {
|
||||
|
||||
}
|
||||
|
||||
public static GameHUD getInstance() {
|
||||
return instance == null ? instance = new GameHUD(WorldStage.getInstance()) : instance;
|
||||
}
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.g2d.TextureRegion;
|
||||
import com.badlogic.gdx.math.Vector2;
|
||||
import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import forge.adventure.data.BiomeSpriteData;
|
||||
import forge.adventure.world.PointOfInterest;
|
||||
import forge.adventure.pointofintrest.PointOfInterest;
|
||||
import forge.adventure.world.WorldSave;
|
||||
import org.apache.commons.lang3.tuple.Pair;
|
||||
|
||||
|
||||
@@ -22,7 +22,7 @@ import forge.adventure.scene.SceneType;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.Current;
|
||||
import forge.adventure.util.Reward;
|
||||
import forge.adventure.world.PointOfInterestChanges;
|
||||
import forge.adventure.pointofintrest.PointOfInterestChanges;
|
||||
import forge.adventure.world.WorldSave;
|
||||
|
||||
import java.util.ArrayList;
|
||||
|
||||
@@ -5,7 +5,7 @@ import com.badlogic.gdx.graphics.Pixmap;
|
||||
import com.badlogic.gdx.graphics.Texture;
|
||||
import com.badlogic.gdx.graphics.g2d.Batch;
|
||||
import com.badlogic.gdx.math.Rectangle;
|
||||
import forge.adventure.world.PointOfInterest;
|
||||
import forge.adventure.pointofintrest.PointOfInterest;
|
||||
|
||||
/**
|
||||
* MapSprite for points of interest to add a bounding rect for collision detection
|
||||
|
||||
@@ -126,4 +126,6 @@ public class Controls {
|
||||
Dialog ret = new Dialog(title, GetSkin());
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
package forge.adventure.util;
|
||||
|
||||
import forge.adventure.world.AdventurePlayer;
|
||||
import forge.adventure.player.AdventurePlayer;
|
||||
import forge.adventure.world.WorldSave;
|
||||
import forge.deck.Deck;
|
||||
/**
|
||||
|
||||
@@ -9,6 +9,8 @@ import com.badlogic.gdx.scenes.scene2d.Actor;
|
||||
import com.badlogic.gdx.utils.Disposable;
|
||||
import com.badlogic.gdx.utils.Json;
|
||||
import forge.adventure.data.*;
|
||||
import forge.adventure.pointofintrest.PointOfInterest;
|
||||
import forge.adventure.pointofintrest.PointOfInterestMap;
|
||||
import forge.adventure.scene.Scene;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.Paths;
|
||||
@@ -375,7 +377,7 @@ public class World implements Disposable, SaveFileContent {
|
||||
|
||||
if(i==j||usedEdges.contains((long)i|((long)j<<32)))
|
||||
continue;
|
||||
float dist = current.position.dst(towns.get(j).position);
|
||||
float dist = current.getPosition().dst(towns.get(j).getPosition());
|
||||
if (dist < smallestDistance) {
|
||||
smallestDistance = dist;
|
||||
smallestIndex = j;
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
package forge.adventure.world;
|
||||
|
||||
import forge.adventure.data.DifficultyData;
|
||||
import forge.adventure.player.AdventurePlayer;
|
||||
import forge.adventure.pointofintrest.PointOfInterestChanges;
|
||||
import forge.adventure.stage.WorldStage;
|
||||
import forge.adventure.util.Config;
|
||||
import forge.adventure.util.SaveFileData;
|
||||
@@ -26,7 +28,7 @@ public class WorldSave {
|
||||
public WorldSaveHeader header = new WorldSaveHeader();
|
||||
private final AdventurePlayer player=new AdventurePlayer();
|
||||
private final World world=new World();
|
||||
private final HashMap<String,PointOfInterestChanges> pointOfInterestChanges=new HashMap<>();
|
||||
private final HashMap<String, PointOfInterestChanges> pointOfInterestChanges=new HashMap<>();
|
||||
|
||||
|
||||
private final SignalList onLoadList=new SignalList();
|
||||
|
||||
@@ -66,19 +66,28 @@
|
||||
"name" : "deck" ,
|
||||
"text" : "Deck",
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"height": 24,
|
||||
"x": 432,
|
||||
"y": 176
|
||||
} ,
|
||||
{
|
||||
"type" : "TextButton",
|
||||
"name" : "menu" ,
|
||||
"text" : "Menu",
|
||||
"type" : "TextButton",
|
||||
"name" : "statistic" ,
|
||||
"text" : "Status",
|
||||
"width": 32,
|
||||
"height": 32,
|
||||
"height": 24,
|
||||
"x": 432,
|
||||
"y": 224
|
||||
}
|
||||
"y": 204
|
||||
} ,
|
||||
{
|
||||
"type" : "TextButton",
|
||||
"name" : "menu" ,
|
||||
"text" : "Menu",
|
||||
"width": 32,
|
||||
"height": 24,
|
||||
"x": 432,
|
||||
"y": 232
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
|
||||
@@ -12,7 +12,7 @@
|
||||
|
||||
{
|
||||
"type" : "Scroll",
|
||||
"name": "settings"
|
||||
"name": "settings",
|
||||
"x": 10,
|
||||
"y": 10 ,
|
||||
"width": 450,
|
||||
|
||||
97
forge-gui/res/adventure/Shandalar/ui/statistic.json
Normal file
97
forge-gui/res/adventure/Shandalar/ui/statistic.json
Normal file
@@ -0,0 +1,97 @@
|
||||
{
|
||||
"width": 480,
|
||||
"height": 270,
|
||||
"yDown": true,
|
||||
"elements":[
|
||||
{
|
||||
"type" : "Image",
|
||||
"image":"ui/title_bg.png",
|
||||
"width": 480,
|
||||
"height": 270
|
||||
} ,
|
||||
|
||||
{
|
||||
"type" : "Scroll",
|
||||
"name": "enemies",
|
||||
"x": 116,
|
||||
"y": 10 ,
|
||||
"width": 344,
|
||||
"height": 235
|
||||
} ,
|
||||
{
|
||||
"type" : "Image",
|
||||
"name": "avatar",
|
||||
"x": 10,
|
||||
"y": 10 ,
|
||||
"width": 64,
|
||||
"height": 64
|
||||
} ,
|
||||
{
|
||||
"type" : "Label",
|
||||
"name": "totalWins",
|
||||
"x": 90,
|
||||
"y": 84 ,
|
||||
"width": 80,
|
||||
"height": 24
|
||||
} ,
|
||||
{
|
||||
"type" : "Label",
|
||||
"text": "Win:",
|
||||
"x": 10,
|
||||
"y": 84 ,
|
||||
"width": 80,
|
||||
"height": 24
|
||||
} ,
|
||||
{
|
||||
"type" : "Label",
|
||||
"name": "totalLoss",
|
||||
"x": 90,
|
||||
"y": 104 ,
|
||||
"width": 80,
|
||||
"height": 24
|
||||
} ,
|
||||
{
|
||||
"type" : "Label",
|
||||
"text": "Loss:",
|
||||
"x": 10,
|
||||
"y": 104 ,
|
||||
"width": 80,
|
||||
"height": 24
|
||||
} ,
|
||||
{
|
||||
"type" : "Label",
|
||||
"name": "lossWinRatio",
|
||||
"x": 90,
|
||||
"y": 124 ,
|
||||
"width": 80,
|
||||
"height": 24
|
||||
} ,
|
||||
{
|
||||
"type" : "Label",
|
||||
"text": "Win Loss Ratio:",
|
||||
"x": 10,
|
||||
"y": 124 ,
|
||||
"width": 80,
|
||||
"height": 24
|
||||
} ,
|
||||
{
|
||||
"type" : "Image",
|
||||
"image" : "ui/avatarhud.png" ,
|
||||
"x": 10,
|
||||
"y": 10 ,
|
||||
"width": 64,
|
||||
"height": 64
|
||||
} ,
|
||||
{
|
||||
"type" : "TextButton",
|
||||
"name" : "return" ,
|
||||
"text" : "Back" ,
|
||||
"width": 48,
|
||||
"height": 16,
|
||||
"x": 15,
|
||||
"y": 250
|
||||
}
|
||||
]
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user