/********************************************************************
*
* File: gfIOpaqueLensComponent.h
*
* Purpose: Interface class for all screen type interactions
* Used as cover over normal game objects to control
* user input and pass it on down the line
*
*********************************************************************/
#ifndef gfIOpaqueLensComponenthdr
#define gfIOpaqueLensComponenthdr
#include "gfILensComponent.h"
struct fsPoint;
class gfIOpaqueLensComponent : public gfILensComponent
{
public:
struct fsSSwipe
{
fsSSwipe() :
mStart(fsPoint{0, 0}),
mEnd(fsPoint{0, 0}),
mActive(false)
{
}
fsPoint mStart;
fsPoint mEnd;
fsBool mActive;
};
struct fsSTap
{
fsSTap() :
mPos(fsPoint{0, 0}),
mActive(false)
{
}
fsPoint mPos;
fsBool mActive;
};
fsSTap& tapGet() { return mLastTap; }
fsSSwipe const& swipeGet() const { return mSwipe; }
virtual ~gfIOpaqueLensComponent();<--- Destructor in derived class
protected:
void initialiseDo() override;
void doOnTap(const fsPoint& pTapPos) override;
void doOnDragStart(const fsPoint& pStartPos) override;
void doOnDragMove(const fsPoint& pCurrPos) override;
void doOnDragEnd(const fsPoint& pEndPos) override;
gfIOpaqueLensComponent(fsCEntity* pParent, fsBool pHandleTaps, fsBool pHandleDragEvent, fsBool pHandlePinchEvents);
private:
fsSSwipe mSwipe;
fsSTap mLastTap;
};
#endif