Erwan
- Added a few "stats" to the main menu. This might slow down loading times on the PSP (needs testing). In that case I'll move it to the options, or optimize it if needed
This commit is contained in:
@@ -42,6 +42,7 @@ class DeckDataWrapper{
|
||||
void updateCounts(MTGCard * card = NULL, int removed = 0);
|
||||
void updateCurrentPosition(MTGCard * currentCard,int color = -1);
|
||||
int getCount(int color = -1);
|
||||
int totalPrice();
|
||||
void save();
|
||||
};
|
||||
|
||||
|
||||
@@ -31,6 +31,8 @@ public:
|
||||
void cleanStats();
|
||||
~DeckStats();
|
||||
int percentVictories(string opponentsDeckFile);
|
||||
int percentVictories();
|
||||
int nbGames();
|
||||
};
|
||||
|
||||
#endif
|
||||
|
||||
@@ -5,11 +5,13 @@
|
||||
#include <dirent.h>
|
||||
#include "../include/GameState.h"
|
||||
#include "../include/SimpleMenu.h"
|
||||
|
||||
#include "../include/TextScroller.h"
|
||||
|
||||
class GameStateMenu: public GameState, public JGuiListener
|
||||
{
|
||||
private:
|
||||
TextScroller * scroller;
|
||||
int scrollerSet;
|
||||
JGuiController* mGuiController;
|
||||
SimpleMenu* subMenuController;
|
||||
SimpleMenu* gameTypeMenu;
|
||||
@@ -38,7 +40,7 @@ class GameStateMenu: public GameState, public JGuiListener
|
||||
float angleMultiplier;
|
||||
float angleW;
|
||||
float yW;
|
||||
|
||||
void fillScroller();
|
||||
public:
|
||||
GameStateMenu(GameApp* parent);
|
||||
virtual ~GameStateMenu();
|
||||
|
||||
@@ -12,6 +12,7 @@
|
||||
|
||||
#include "../include/GameApp.h"
|
||||
#include "../include/TexturesCache.h"
|
||||
|
||||
#include <string>
|
||||
|
||||
using std::string;
|
||||
|
||||
@@ -6,6 +6,8 @@
|
||||
#include "../include/MTGDeck.h"
|
||||
#include <stdio.h>
|
||||
|
||||
class MTGAllCards;
|
||||
|
||||
class Price{
|
||||
public:
|
||||
int cardid;
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
#ifndef _TEXTSCROLLER_H_
|
||||
#define _TEXTSCROLLER_H_
|
||||
|
||||
class JLBFont;
|
||||
#include <JGui.h>
|
||||
#include <string>
|
||||
#include <vector>
|
||||
using namespace std;
|
||||
|
||||
class TextScroller: public JGuiObject{
|
||||
private:
|
||||
string mText;
|
||||
string tempText;
|
||||
JLBFont * mFont;
|
||||
float mWidth;
|
||||
float mSpeed;
|
||||
float mX;
|
||||
float mY;
|
||||
float start;
|
||||
int timer;
|
||||
vector<string> strings;
|
||||
int currentId;
|
||||
int mRandom;
|
||||
public:
|
||||
void Add(string text);
|
||||
void Reset();
|
||||
void setRandom(int mode = 1);
|
||||
TextScroller(JLBFont * font, float x, float y, float width, float speed = 30);
|
||||
void Render();
|
||||
void Update(float dt);
|
||||
};
|
||||
|
||||
#endif
|
||||
Reference in New Issue
Block a user