-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathModelControls.h
62 lines (46 loc) · 1.66 KB
/
ModelControls.h
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
// Copyright 2009 Isis Innovation Limited
//
// C++ Interface: ModelControls
//
// Description: ModelControls user interface. Displays the control buttons,
// and handles user interaction
//
// Author: Robert Castle <[email protected]>, (C) 2009
//
// Copyright: See COPYING file that comes with this distribution
//
#ifndef PTAMMMODELCONTROLS_H
#define PTAMMMODELCONTROLS_H
#include <vector>
#include <string>
#include "GLWindow2.h"
#include "ModelsGameData.h"
namespace PTAMM {
class MGButton;
class Model3DS;
using namespace TooN;
/**
* The control buttons for placing and orienting models.
* @author Robert Castle <[email protected]>
*/
class ModelControls{
public:
ModelControls( ModelsGameData & data );
~ModelControls();
void Init();
void Draw( const GLWindow2 &glWindow );
bool HandleClick(Vector<2> v2VidCoords, int nButton);
void HandlePressAndHold();
private:
ModelsGameData & mData; // Reference to the game data object
std::vector< MGButton* > mvButtons; // The buttons
MGButton * mpButton; // The button that is currently being pressed
CVD::ImageRef mControlsTopLeft; // The location of the top left of the control panel
CVD::ImageRef mControlsBottomRight; // The location of the bottom right of the control panel
bool mbInitialized; // Has the panel been initialized
std::string msHelpTip; // The help tip
int mnHelpCounter; // How many frames has the tip been displayed for
CVD::ImageRef mirHelpLocation; // Location of the help tip
};
}
#endif