aboutsummaryrefslogtreecommitdiff
path: root/mwe/events/include/inputSystem.h
blob: c20562d30759e0989ee182c37d169ebd25233635 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
#pragma once
#include <vector>
#include "uiObject.h"
#include "event.h"
#include "keyCodes.h"
#include "eventManager.h"
class InputSystem {
public:
    InputSystem();
    void registerButton(Button* button);
	void registerText(Text* label);
	void registerTextInput(TextInput* input);
    void processInput();

private:
    std::vector<Button*> buttons;
	std::vector<TextInput*> textInputs;
	std::vector<Text*> texts;
    void processMouseClick(int mouseX, int mouseY);
	void processInputField(int mouseX, int mouseY);
	void processKeyPress(Keycode);
	void processTextInput(const std::string& text);
	
};