Files
wagic/projects/mtg/include/GuiLayers.h
Xawotihs 9adb9d625d - reworked the testsuite and the rules (storyflow) to use the same game deserialization code, moved that code to the players and zone classes
- removed every references to the gameobserver singleton. This object can now be instantiated several times as it's needed for minmax. To be able to do that, I mostly added a reference to a gameobserver from any targetable object (cards, players, spells) and abilities.
2011-10-01 13:30:30 +00:00

61 lines
1.1 KiB
C++

#ifndef _GUI_LAYERS_H_
#define _GUI_LAYERS_H_
#define DIR_DOWN 1
#define DIR_UP 2
#define DIR_LEFT 3
#define DIR_RIGHT 4
#include <JGui.h>
#include "WEvent.h"
class GameObserver;
class Player;
class GuiLayer
{
protected:
JButton mActionButton;
GameObserver* observer;
public:
int mCurr;
vector<JGuiObject *> mObjects;
vector<JGuiObject *> manaObjects;
void Add(JGuiObject * object);
int Remove(JGuiObject * object);
int modal;
bool hasFocus;
virtual void resetObjects();
int getMaxId();
GuiLayer(GameObserver *observer);
virtual ~GuiLayer();
virtual void Update(float dt);
virtual bool CheckUserInput(JButton key)
{
return false;
}
int getIndexOf(JGuiObject * object);
JGuiObject * getByIndex(int index);
virtual void Render();
int empty()
{
if (mObjects.size())
return 0;
return 1;
}
virtual int receiveEventPlus(WEvent * e)
{
return 0;
}
virtual int receiveEventMinus(WEvent * e)
{
return 0;
}
};
#endif