fixed avatar image issue when selecting ai decks outside of the default 100 ai decks.

installed a horizontal text scroller for the deck selection screens in normal play
TODO:-> Need to make it smoother transition.  It currently just replaces the text with the new text.
This commit is contained in:
techdragon.nguyen@gmail.com
2010-11-02 02:20:44 +00:00
parent afe52d883a
commit f472c48a8a
6 changed files with 99 additions and 25 deletions
+1
View File
@@ -39,6 +39,7 @@ public:
string getDescription();
string getName();
string getAvatarFilename();
int getAvatarId(int deckId);
string getStatsSummary();
int getDeckId();
+4 -1
View File
@@ -7,6 +7,7 @@
#include "DeckMenu.h"
#include "MTGDeck.h"
#include "GameObserver.h"
#include "TextScroller.h"
#define CHOOSE_OPPONENT 7
@@ -32,6 +33,7 @@ class GameStateDuel: public GameState, public JGuiListener
DeckMenu * deckmenu;
DeckMenu * opponentMenu;
SimpleMenu * menu;
TextScroller * scroller;
bool premadeDeck;
int OpponentsDeckid;
string musictrack;
@@ -40,7 +42,8 @@ class GameStateDuel: public GameState, public JGuiListener
bool MusicExist(string FileName);
void loadPlayer(int playerId, int decknb = 0, int isAI = 0);
void ensureOpponentMenu(); //loads the opponentMenu if it doesn't exist
void initScroller();
public:
GameStateDuel(GameApp* parent);
virtual ~GameStateDuel();
+3 -1
View File
@@ -21,11 +21,13 @@ protected:
vector<string> strings;
unsigned int currentId;
int mRandom;
int scrollDirection;
public:
void Add(string text);
void Reset();
void setRandom(int mode = 1);
TextScroller(int fontId, float x, float y, float width, float speed = 30);
TextScroller(int fontId, float x, float y, float width, float speed = 30, int scrollerType = 0);
void Render();
void Update(float dt);
virtual ostream& toString(ostream& out) const;