Karma Engine
Loading...
Searching...
No Matches
WindowsInput.h
1#pragma once
2
3#include "Karma/Input.h"
4#include "Karma/Events/ControllerDeviceEvent.h"
5
6namespace Karma
7{
9 {
11 Input::EventCallbackFn EventCallback;
12 };
13
14 class KARMA_API WindowsInput : public Input
15 {
16 public:
18
19 void SetEventCallback(const EventCallbackFn& callback, Window* window) override;
20
21 protected:
22 virtual bool IsKeyPressedImpl(int keycode) override;
23 virtual bool IsMouseButtonPressedImpl(int button) override;
24 virtual bool IsMouseButtonReleasedImpl(int button) override;
25 virtual bool IsControllerButtonPressedImpl(int button, int cID) override;
26 virtual float ControllerAxisPivotValImpl(int axis, int cID) override;
27
28 virtual std::pair<float, float> GetMousePositionImpl() override;
29 virtual float GetMouseXImpl() override;
30 virtual float GetMouseYImpl() override;
31
32 void OnControllerDeviceConnected(ControllerDeviceConnectedEvent& e);
33 void OnControllerDeviceDisconnected(ControllerDeviceDisconnectedEvent& e);
34
35 WindowsInputData m_Data;
36 };
37
38}
Definition ControllerDeviceEvent.h:10
Definition ControllerDeviceEvent.h:31
Definition Input.h:73
Definition Window.h:27
Definition WindowsInput.h:15
Definition Input.h:25
Definition WindowsInput.h:9