-
Notifications
You must be signed in to change notification settings - Fork 2
/
ListMenu.h
38 lines (29 loc) · 821 Bytes
/
ListMenu.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
#pragma once
#include "Engine.h"
#include <algorithm>
#include <vector>
class CListMenu {
struct SMenuEntry {
g3d::Model *model;
glm::vec3 rotation;
};
std::vector<SMenuEntry> menuEntries;
int selectedEntry;
bool entryClicked;
glm::vec3 selectedColor, defaultColor;
glm::vec3 position;
glm::vec3 directionModifier;
public:
CListMenu();
~CListMenu();
void draw();
void control();
void addEntry(g3d::Model *model,
const glm::vec3 &rotation = {0.f, 0.f, 0.f});
void setSelectionColor(const glm::vec3 &color);
void setDefaultColor(const glm::vec3 &color);
void setPosition(const glm::vec3 &position);
void setDirectionModifier(const glm::vec3 &modifier);
bool IsEntryClicked();
int getCurrentEntryID();
};