-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathSampleView.h
More file actions
43 lines (32 loc) · 1.02 KB
/
SampleView.h
File metadata and controls
43 lines (32 loc) · 1.02 KB
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
/**
* @author Carolin Schindler
*/
#ifndef SFMLCOMPONENTS_SAMPLEVIEW_H
#define SFMLCOMPONENTS_SAMPLEVIEW_H
#include "Elements/TextField.h"
#include "Elements/Button.h"
#include "Elements/EditField.h"
#include "Listener/OnClickListener.h"
#include "Listener/OnTextListener.h"
#include "WindowViews/WindowView.h"
class SampleView: public WindowView {
public:
//Constructor
SampleView(sf::Font &font);
void draw(sf::RenderWindow &renderWindow) override;
void listen(sf::Event event, sf::RenderWindow &renderWindow) override;
private:
//Elements
inline static TextField tf;
inline static Button bt;
inline static EditField ef;
//Listener
inline static OnClickListener btListener;
inline static OnClickListener efListener;
inline static OnTextListener textListener;
//Listener methods
static void btClickFunction(Listener *listener);
static void efClickFunction(Listener *listener);
static void textFunction(Listener *listener);
};
#endif //SFMLCOMPONENTS_SAMPLEVIEW_H