-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathCustomOptions.h
47 lines (36 loc) · 1.17 KB
/
CustomOptions.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
#ifndef CustomOptions_h
#include "SFML/Window.hpp"
#include "SFML/Graphics.hpp"
using namespace sf;
class CustomOptions : public Transformable
{
public:
CustomOptions(RenderWindow& window_ref, Font& font);
void moveGroup(float x, float y);
void setGroupPosition(Vector2f position);
void draw();
void setSelectedOption(short int selectedOptionIndex);
void manageInput(Keyboard::Key key);
void manageInput(Mouse::Button button);
void pushChar(char input);
void updateMouse();
void reset();
short int getWidth() { return this->customAmounts[0]; }
short int getHeight() { return this->customAmounts[1]; }
short int getBombCount() { return this->customAmounts[2]; }
IntRect getMouseBox(bool index);
private:
Text customTexts[3]; //modifiable value
short int customAmounts[3];
Text limits[6];
short int limits_amount[6];
RectangleShape textBoxes[3]; //frame for modifiable values
Text descriptions[3];
Text custom_mouseBoxes[2];
RenderWindow& window_ref;
enum SelectedOption { width, height, bombCount };
SelectedOption selectedOption = SelectedOption::width;
Color selectedRectColor = Color(250, 0, 0);
Color normalRectColor = Color::Black;
};
#endif // !CustomOptions_h