Fission FSN
Loading...
Searching...
No Matches
gfCParkOfficeTapComponent.h
Go to the documentation of this file.
1/********************************************************************
2*
3* File: gfCParkOfficeTapComponent.h
4*
5* Purpose: Makes the staff office tappable to toggle
6* gfCParkLevelComponent's "repair armed" flag; the next
7* building tap then dispatches a repairer instead of
8* deploy/recall (see gfCParkSlotStaffComponent).
9*
10*********************************************************************/
11
12#ifndef gfCParkOfficeTapComponenthdr
13#define gfCParkOfficeTapComponenthdr
14
16
18
19struct fsPoint;
20
22{
23 friend class fsCComponentFactory;
24
25public:
26
27 static const fsCUniqueId mTypeId;
28
30
31protected:
32
33 // Tints the office to show whether repair dispatch is currently armed.
34 void updateDo(fsS32 pDeltaMs) override;
35
36 void listenersRegisterDo() override;
37 void listenersDeregisterDo() override;
38 fsBool messageProcessDo(const fsCUniqueId& pMessageType,
39 const fsIMessageDispatcher::sMessageParameters& pParam) override;
40
41 static fsIComponent* const create(fsCEntity* const pParent);
43
44private:
45
46 fsBool hitTest(const fsPoint& pPointerPos) const;
47 void armToggle();
48
49 // -1 until the first tint, then 0/1 for disarmed/armed, so the colour is
50 // only reapplied when it changes.
51 fsS32 mTintState;
52};
53
54#endif
Definition fsCEntity.h:39
Definition fsCUniqueId.h:21
fsIComponent(fsCEntity *pParent)
Definition fsIComponent.cpp:86
fsIMessageListenerComponent(fsCEntity *pParent)
Definition fsIMessageListenerComponent.cpp:9
fsBool messageProcessDo(const fsCUniqueId &pMessageType, const fsIMessageDispatcher::sMessageParameters &pParam) override
Definition gfCParkOfficeTapComponent.cpp:78
friend class fsCComponentFactory
Definition gfCParkOfficeTapComponent.h:23
static fsIComponent *const create(fsCEntity *const pParent)
Definition gfCParkOfficeTapComponent.cpp:93
void listenersDeregisterDo() override
Definition gfCParkOfficeTapComponent.cpp:72
gfCParkOfficeTapComponent(fsCEntity *const pParent)
Definition gfCParkOfficeTapComponent.cpp:98
static const fsCUniqueId mTypeId
Definition gfCParkOfficeTapComponent.h:27
void updateDo(fsS32 pDeltaMs) override
Definition gfCParkOfficeTapComponent.cpp:46
void listenersRegisterDo() override
Definition gfCParkOfficeTapComponent.cpp:66
virtual ~gfCParkOfficeTapComponent()
Definition gfCParkOfficeTapComponent.cpp:104
bool fsBool
Definition fsBaseTypes.h:26
int fsS32
Definition fsBaseTypes.h:20
Definition fsIMessageDispatcher.h:32
Definition fsPoint.h:17