Fission FSN
Loading...
Searching...
No Matches
gfIOpaqueLensComponent.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfIOpaqueLensComponent.h
4*
5* Purpose: Interface class for all screen type interactions
6* Used as cover over normal game objects to control
7* user input and pass it on down the line
8*
9*********************************************************************/
10
11#ifndef gfIOpaqueLensComponenthdr
12#define gfIOpaqueLensComponenthdr
13
14#include "gfILensComponent.h"
15
16struct fsPoint;
17
18
20{
21public:
22
23 struct fsSSwipe
24 {
26 mStart(fsPoint{0, 0}),
27 mEnd(fsPoint{0, 0}),
28 mActive(false)
29 {
30 }
31
35 };
36
37 struct fsSTap
38 {
40 mPos(fsPoint{0, 0}),
41 mActive(false)
42 {
43 }
44
47 };
48
49 fsSTap& tapGet() { return mLastTap; }
50 fsSSwipe const& swipeGet() const { return mSwipe; }
51
53
54protected:
55
56 void initialiseDo() override;
57
58 void doOnTap(const fsPoint& pTapPos) override;
59
60 void doOnDragStart(const fsPoint& pStartPos) override;
61 void doOnDragMove(const fsPoint& pCurrPos) override;
62 void doOnDragEnd(const fsPoint& pEndPos) override;
63
64 gfIOpaqueLensComponent(fsCEntity* pParent, fsBool pHandleTaps, fsBool pHandleDragEvent, fsBool pHandlePinchEvents);
65
66private:
67
68 fsSSwipe mSwipe;
69 fsSTap mLastTap;
70};
71
72#endif
Definition fsCEntity.h:39
gfILensComponent(fsCEntity *pParent, fsBool pHandleTaps, fsBool pHandleDragEvent, fsBool pHandlePinchEvents)
Definition gfILensComponent.cpp:300
fsSTap & tapGet()
Definition gfIOpaqueLensComponent.h:49
void doOnDragMove(const fsPoint &pCurrPos) override
Definition gfIOpaqueLensComponent.cpp:25
void doOnDragStart(const fsPoint &pStartPos) override
Definition gfIOpaqueLensComponent.cpp:16
fsSSwipe const & swipeGet() const
Definition gfIOpaqueLensComponent.h:50
gfIOpaqueLensComponent(fsCEntity *pParent, fsBool pHandleTaps, fsBool pHandleDragEvent, fsBool pHandlePinchEvents)
Definition gfIOpaqueLensComponent.cpp:47
virtual ~gfIOpaqueLensComponent()
Definition gfIOpaqueLensComponent.cpp:53
void doOnTap(const fsPoint &pTapPos) override
Definition gfIOpaqueLensComponent.cpp:8
void doOnDragEnd(const fsPoint &pEndPos) override
Definition gfIOpaqueLensComponent.cpp:32
void initialiseDo() override
Definition gfIOpaqueLensComponent.cpp:40
bool fsBool
Definition fsBaseTypes.h:26
Definition fsPoint.h:17
Definition gfIOpaqueLensComponent.h:24
fsPoint mStart
Definition gfIOpaqueLensComponent.h:32
fsPoint mEnd
Definition gfIOpaqueLensComponent.h:33
fsBool mActive
Definition gfIOpaqueLensComponent.h:34
fsSSwipe()
Definition gfIOpaqueLensComponent.h:25
Definition gfIOpaqueLensComponent.h:38
fsBool mActive
Definition gfIOpaqueLensComponent.h:46
fsPoint mPos
Definition gfIOpaqueLensComponent.h:45
fsSTap()
Definition gfIOpaqueLensComponent.h:39