Files
wagic/projects/mtg/include/PlayGuiObject.h
jean.chalard 3349f974f1 J :
* New interface.
* This breaks a lot of things. It is not feature-equivalent. It
  probably doesn't compile under windows and doesn't work on PSP.
* Damage is not resolved any more. This will have to be fixed.
* Blockers can't be ordered any more. This will have to be fixed.
* A lot of new art is included.
2009-08-22 05:59:43 +00:00

40 lines
970 B
C++

/*
A class for all interactive objects in the play area (cards, avatars, etc...)
*/
#ifndef _PLAYGUIOBJECT_H_
#define _PLAYGUIOBJECT_H_
#define GUI_AVATAR 1
#define GUI_CARD 2
#define GUI_GRAVEYARD 3
#define GUI_LIBRARY 4
#include <JGui.h>
#include "Effects.h"
#include "WEvent.h"
#include "Pos.h"
class PlayGuiObject: public JGuiObject, public JGuiListener, public Pos{
protected:
public:
int wave;
float mHeight;
float defaultHeight;
bool mHasFocus;
int type;
virtual void Entering(){mHasFocus = true;};
virtual bool Leaving(u32 key){mHasFocus = false;return true;};
virtual bool ButtonPressed(){return true;};
virtual void Render();
virtual void Update(float dt);
PlayGuiObject(float desiredHeight, float x, float y, bool hasFocus);
PlayGuiObject(float desiredHeight, const Pos& ref, bool hasFocus);
virtual void ButtonPressed(int controllerId, int controlId){};
virtual ~PlayGuiObject(){};
vector<Effect*> effects;
};
#endif