-
Notifications
You must be signed in to change notification settings - Fork 0
/
MainMenu.h
58 lines (47 loc) · 1.19 KB
/
MainMenu.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
/**
* Main menu.
*
* @author Francis BISSON
*/
#ifndef MAINMENU_H
#define MAINMENU_H
// INCLUDES ////////////////////////////////////////////////////////////////////
#include "Font.h"
#include "Point.hpp"
#include "Rectangle.h"
#include "Scene.h"
#include "ShapeAnimation.h"
#include "Text.h"
#include "VisibilityAnimation.h"
// FORWARD DECLARATIONS ////////////////////////////////////////////////////////
class DisplayContext;
class Game;
// CLASS DEFINITION ////////////////////////////////////////////////////////////
class MainMenu : public Scene
{
public:
MainMenu(Game* game);
virtual ~MainMenu();
virtual bool Init();
virtual void Update(double deltaTime);
virtual void Render(DisplayContext* displayContext);
protected:
enum Items
{
ITEM_PLAY_GAME = 0,
ITEM_OPTIONS,
ITEM_QUIT,
ITEM_QTY
};
FontPtr m_Font;
TextPtr m_MenuElements[ITEM_QTY];
Point m_Positions[ITEM_QTY];
Text m_FocusText;
int m_FocusIndex;
RectanglePtr m_VerticalRect;
RectanglePtr m_HorizontalRect;
ShapeAnimation m_VerticalRectAnim;
ShapeAnimation m_HorizontalRectAnim;
VisibilityAnimation m_BlinkAnim;
};
#endif // FONT_H