Repository navigation
Expand file tree
/
Copy pathGaTestSelectionComponent.h
More file actions
77 lines (58 loc) · 1.75 KB
/
Copy pathGaTestSelectionComponent.h
File metadata and controls
77 lines (58 loc) · 1.75 KB
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
/**************************************************************************
*
* File: GaTestSelectionComponent.h
* Author: Neil Richardson
* Ver/Date:
* Description:
* Test selection component.
*
*
*
*
**************************************************************************/
#ifndef __GaTestSelectionComponent_H__
#define __GaTestSelectionComponent_H__
#include "Psybrus.h"
#include "System/Os/OsEvents.h"
#include "System/Scene/ScnEntity.h"
#include "System/Scene/Rendering/ScnFont.h"
#include "System/Debug/DsCore.h"
//////////////////////////////////////////////////////////////////////////
// GaExampleComponentRef
typedef ReObjectRef< class GaTestSelectionComponent > GaTestSelectionComponentRef;
//////////////////////////////////////////////////////////////////////////
// GaMenuEntry
struct GaMenuEntry
{
REFLECTION_DECLARE_BASIC( GaMenuEntry );
GaMenuEntry(){};
std::string Name_;
ScnEntityRef Entity_;
};
//////////////////////////////////////////////////////////////////////////
// GaTestSelectionComponent
class GaTestSelectionComponent:
public ScnComponent
{
public:
REFLECTION_DECLARE_DERIVED( GaTestSelectionComponent, ScnComponent );
GaTestSelectionComponent();
virtual ~GaTestSelectionComponent();
virtual void update( BcF32 Tick );
virtual void onAttach( ScnEntityWeakRef Parent );
virtual void onDetach( ScnEntityWeakRef Parent );
eEvtReturn onKeyPress( EvtID ID, const EvtBaseEvent& Event );
private:
std::vector< GaMenuEntry > Options_;
BcU32 SelectedEntry_;
ScnEntityRef PreviousSpawned_;
ScnFontComponentRef FontComponent_;
ScnCanvasComponentRef Canvas_;
MaMat4d Projection_;
BcBool RunAutomatedTest_;
BcF32 TestMaxTime_;
BcF32 TestTime_;
void LoadEntity(int Entity);
std::vector< BcU32 > OptionsHandles_;
};
#endif