Files
wagic/projects/mtg/include/GuiLayers.h
wagic.the.homebrew@gmail.com c8333e76b1 Erwan
- Updated Parser mechanism. Right now this doesn't change functionalities much, but should be more readable, and make it easier to code some new abilities in the future
- Fixed regenerate, broken with r532
- Death Ward now works
- I think "&&" now works with all abilities, needs to be tested...
2009-07-11 15:59:51 +00:00

68 lines
1.4 KiB
C++

#ifndef _GUI_LAYERS_H_
#define _GUI_LAYERS_H_
#define MAX_GUI_LAYERS 7
#define DIR_DOWN 1
#define DIR_UP 2
#define DIR_LEFT 3
#define DIR_RIGHT 4
#include <JGui.h>
#include "../include/WEvent.h"
class GameObserver;
class Player;
class GuiLayer{
protected:
GameObserver * game;
int mId;
u32 mActionButton;
public:
int mCount;
int mCurr;
vector<JGuiObject *>mObjects;
void Add(JGuiObject * object);
int Remove(JGuiObject * object);
int modal;
bool hasFocus;
virtual void resetObjects();
int getMaxId();
void RenderMessageBackground(float x0, float y0, float width, int height);
void RenderMessageBackground(float y0, int height);
GuiLayer(int id, GameObserver* _game);
virtual ~GuiLayer();
virtual void Update(float dt);
virtual bool CheckUserInput(u32 key){ return false; };
virtual int unstoppableRenderInProgress(){return 0;};
int getIndexOf(JGuiObject * object);
JGuiObject * getByIndex (int index);
virtual void Render();
int empty(){
if (mCount) return 0;
return 1;
};
virtual int receiveEvent(WEvent * e){return 0;};
};
class GuiLayers{
protected:
int nbitems;
GuiLayer * objects[MAX_GUI_LAYERS];
public:
GuiLayers();
virtual void Update(float dt, Player * player);
void Render();
void Add(GuiLayer * layer);
void Remove();
int unstoppableRenderInProgress();
~GuiLayers();
int receiveEvent(WEvent * e);
};
#endif