-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathInputHandler.h
45 lines (35 loc) · 986 Bytes
/
InputHandler.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
#pragma once
#include <SFML/Graphics.hpp>
#include <vector>
#include "Button.h"
#include "Screen.h"
#include "ScreenManagerRemoteControl.h"
using namespace sf;
using namespace std;
class Screen;
class InputHandler
{
private:
Screen* m_ParentScreen;
vector<shared_ptr<Button>> m_Buttons;
View* m_PointerToUIPanelView;
ScreenManagerRemoteControl* m_ScreenManagerRemoteControl;
public:
void initialiseInputHandler(
ScreenManagerRemoteControl* sw,
vector<shared_ptr<Button>>,
View* pointerToUIView,
Screen* parentScreen);
void handleInput(RenderWindow& window, Event& event);
virtual void handleGamepad();
virtual void handleKeyPressed(Event& event,
RenderWindow& window);
virtual void handleKeyReleased(Event& event,
RenderWindow& window);
virtual void handleLeftClick(string& buttonInteractedWith,
RenderWindow& window);
View* getPointerToUIView();
ScreenManagerRemoteControl*
getPointerToScreenManagerRemoteControl();
Screen* getmParentScreen();
};