* Add missing files.
This commit is contained in:
jean.chalard
2009-08-22 06:01:52 +00:00
parent 3349f974f1
commit b2f75d45e7
21 changed files with 1625 additions and 0 deletions

View File

@@ -0,0 +1,48 @@
#ifndef _CARDSELECTOR_H_
#define _CARDSELECTOR_H_
#include <vector>
#include "GuiLayers.h"
#include "DuelLayers.h"
#include "Pos.h"
using std::vector;
class PlayGuiObject;
class DuelLayers;
template <typename T>
struct LimitorFunctor
{
virtual bool select(T*) = 0;
virtual bool greyout(T*) = 0;
typedef T Target;
};
template <typename T=PlayGuiObject>
class ObjectSelector : public GuiLayer
{
protected:
vector<T*> cards;
T* active;
bool showBig;
DuelLayers* duel;
LimitorFunctor<T>* limitor;
Pos bigpos;
public:
ObjectSelector(DuelLayers*);
void Add(T*);
void Remove(T*);
bool CheckUserInput(u32 key);
void Update(float dt);
void Render();
void Limit(LimitorFunctor<T>* limitor);
typedef T Target;
};
typedef ObjectSelector<> CardSelector;
typedef LimitorFunctor<CardSelector::Target> Limitor;
#endif