Karma Engine
Loading...
Searching...
No Matches
ControllerDeviceEvent.h
1#pragma once
2
3#include "krpch.h"
4
5#include "Event.h"
6
7namespace Karma
8{
9 class KARMA_API ControllerDeviceConnectedEvent : public Event
10 {
11 public:
12 ControllerDeviceConnectedEvent(int cID, int status) : m_ControllerID(cID), m_Status(status)
13 {
14 }
15
16 std::string ToString() const override
17 {
18 std::stringstream ss;
19 ss << "ControllerDeviceConnectedEvent";
20 return ss.str();
21 }
22
23 EVENT_CLASS_TYPE(GameControllerConnected)
24 EVENT_CLASS_CATEGORY(EventCategoryGameControllerDevice)
25 private:
26 int m_ControllerID;
27 int m_Status;
28 };
29
31 {
32 public:
33 ControllerDeviceDisconnectedEvent(int cID, int status) : m_ControllerID(cID), m_Status(status)
34 {
35 }
36
37 std::string ToString() const override
38 {
39 std::stringstream ss;
40 ss << "ControllerDeviceDisconnectedEvent";
41 return ss.str();
42 }
43
44 EVENT_CLASS_TYPE(GameControllerConnected)
45 EVENT_CLASS_CATEGORY(EventCategoryGameControllerDevice)
46 private:
47 int m_ControllerID;
48 int m_Status;
49 };
50}
Definition ControllerDeviceEvent.h:10
Definition ControllerDeviceEvent.h:31
Definition Event.h:35