Fission FSN
Loading...
Searching...
No Matches
fsCCheatButtonComponent.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: fsCCheatButtonComponent.h
4*
5* Purpose: Cheat buttons to skip levels but also draggable to
6* rearrange levels
7*
8* Moved here from fsAppCore (post-Phase-6 gfHogCore link
9* leak cleanup) - its entire purpose is reordering
10* gfHogCore's level-sequencer-map thumbnails
11* (gfCLevelSequencerMapComponent et al), so it was never
12* actually generic despite living in the base component
13* factory, where every game (including gfTimeCore)
14* compiled and unconditionally registered it.
15*
16*********************************************************************/
17
18#ifndef fsCCheatButtonComponenthdr
19#define fsCCheatButtonComponenthdr
20
22
24
25struct fsPoint;
26class fsCResourceName;
27class fsIFont;
28class fsCBrush;
29
31{
32 friend class fsCComponentFactory;
34
35public:
36
37 static const fsCUniqueId mTypeId;
38 void init(const fsStr& pSceneName);
39 fsBool highlightSetDo() override;
40
41protected:
42
43 fsBool hitTestDo(const fsPoint& pPos) const override;
44 void onDragStart(const fsPoint& pStartPos) override;
45 void onDragMove(const fsPoint& pCurrPos) override;
46 void onDragEnd(const fsPoint& pEndPos) override;
47
48 static fsIComponent* create(fsCEntity* pParent);
49
50 void initialiseFromVariableTableDo(const fsCVariableTable& pVars) override;
51
54
55
56private:
57
58 void thumbnailSet();
59
60 fsCEntity* dragTargetGet() const;
61 fsStr mThumbnailName;
62 fsStr mSceneName;
63
64};
65
66#endif
Definition fsCBrush.h:26
fsCButtonComponent(fsCEntity *pParent)
Definition fsCButtonComponent.cpp:214
void initialiseFromVariableTableDo(const fsCVariableTable &pVars) override
Definition fsCCheatButtonComponent.cpp:163
static const fsCUniqueId mTypeId
Definition fsCCheatButtonComponent.h:37
friend class gfIAutoTestLevelUserInputComponent
Definition fsCCheatButtonComponent.h:33
fsBool hitTestDo(const fsPoint &pPos) const override
Definition fsCCheatButtonComponent.cpp:79
friend class fsCComponentFactory
Definition fsCCheatButtonComponent.h:32
void onDragStart(const fsPoint &pStartPos) override
Definition fsCCheatButtonComponent.cpp:26
static fsIComponent * create(fsCEntity *pParent)
Definition fsCCheatButtonComponent.cpp:168
fsBool highlightSetDo() override
Definition fsCCheatButtonComponent.cpp:94
fsCCheatButtonComponent(fsCEntity *pParent)
Definition fsCCheatButtonComponent.cpp:173
void init(const fsStr &pSceneName)
Definition fsCCheatButtonComponent.cpp:134
virtual ~fsCCheatButtonComponent()
Definition fsCCheatButtonComponent.cpp:179
void onDragEnd(const fsPoint &pEndPos) override
Definition fsCCheatButtonComponent.cpp:48
void onDragMove(const fsPoint &pCurrPos) override
Definition fsCCheatButtonComponent.cpp:39
Definition fsCEntity.h:39
Definition fsCResourceName.h:32
Definition fsCUniqueId.h:21
Definition fsCVariableTable.h:27
Definition fsIComponent.h:26
Definition fsIFont.h:34
Definition fsStr.h:23
bool fsBool
Definition fsBaseTypes.h:26
Definition fsPoint.h:17