Files
wagic/projects/mtg/include/GameStateShop.h
wagic.jeck 0a863bcbad Jeck - [JGE recompile needed] Shop cleanup, Interface enhancements.
Added basic transition system that works with GameApp's phases. Currently does a fade-out between elements, which works well in some places and not-so-well in others. We'll definitely want to think about where and where not to use it... they'd work a lot better if we could spawn a thread to handle loading the next state while transitioning.

Also cleaned up the shop a bit, so it uses ReadButton() instead of GetButtonClick()-- hence the slight change to JGE. Added a tiled image for the task board, which loads conservatively (I tried 128x128, but it didn't look as good).
2010-02-01 18:27:25 +00:00

51 lines
1014 B
C++

#ifndef _GAME_STATE_SHOP_H_
#define _GAME_STATE_SHOP_H_
#include <JGE.h>
#include "../include/GameState.h"
#include "../include/SimpleMenu.h"
#include "../include/ShopItem.h"
#include "../include/Tasks.h"
#define STATE_BUY 1
#define STATE_SELL 2
#define STAGE_SHOP_MENU 3
#define STAGE_SHOP_SHOP 4
#define STAGE_SHOP_TASKS 5
#define STAGE_FADE_IN 6
class GameStateShop: public GameState, public JGuiListener
{
private:
ShopItems * shop;
JTexture * altThumb[8];
JQuad * mBack;
JQuad * mBg;
JTexture * mBgTex;
TaskList * taskList;
SimpleMenu * menu;
int mStage;
char starterBuffer[128], boosterBuffer[128];
char setNames[SHOP_BOOSTERS][128];
int setIds[SHOP_BOOSTERS];
void load();
public:
GameStateShop(GameApp* parent);
virtual ~GameStateShop();
virtual void Start();
virtual void End();
virtual void Create();
virtual void Destroy();
virtual void Update(float dt);
virtual void Render();
virtual void ButtonPressed(int controllerId, int controlId);
};
#endif