-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDropDown.h
37 lines (31 loc) · 940 Bytes
/
DropDown.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
#ifndef SFMLSET_DROPDOWN_H
#define SFMLSET_DROPDOWN_H
#include "Itemlist.h"
#include "InputBox.h"
#include "History.h"
#include "GUIComponents.h"
class DropDown: public GUIComponents{
private:
/* data */
Itemlist menu; // menu list
SnapShot snap; // Snapshot
// InputBox box;
InputBox input; // each input box and change color when past
float x, y;
int click;
public:
DropDown();
DropDown(vector<string> vec); // given list of string
void SetVec(vector<string> vec);
void SetPosition(float x, float y);
void SetSize(int n);
void SetTitle(string title);
virtual void draw(sf::RenderTarget& window, sf::RenderStates states) const;
void addEventHandler(sf::RenderWindow& window, sf::Event event);
void update();
int GetClick(){return click;}
void SetClick(int n);
SnapShot& getSnapShot();
void applySnapshot(const SnapShot& snapshot);
};
#endif