1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
/********************************************************************
*
*	File:		gfCTrapComponent.h
*
*	Purpose:	Component which covers another up and shows up on
*				mouse devices as a change in cursor
*
*********************************************************************/

#ifndef gfCTrapComponenthdr
#define gfCTrapComponenthdr

#include <fsCore/src/fsCUniqueId.h>

#include "gfCTappableCollectableComponent.h"


class gfCTrapComponent : public gfCTappableCollectableComponent
{
	friend class fsCComponentFactory;
	friend class gfCTutorialSequencerComponent;

public:

	static const fsCUniqueId mTypeId;
	static const fsStr mEntityPrefix;

protected:

	fsBool messageProcessDo(const fsCUniqueId& pMessageType,
	                        const fsIMessageDispatcher::sMessageParameters& pParam) override;

	static fsIComponent* create(fsCEntity* pParent);

	gfCTrapComponent(fsCEntity* pParent);
	virtual ~gfCTrapComponent();<--- Destructor in derived class

private:

	void cursorNotify(const fsIMessageDispatcher::sMessageParameters& pParam);
	fsBool mMouseOver;
};

#endif