Blamite Game Engine - blam!  00263.10.17.20.0001.blamite
The core library for the Blamite Game Engine.
KeyPressEvent.hpp
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../events.h"
4 
5 namespace Blam::Events
6 {
12  class KeyPressEvent : public Event
13  {
14  private:
15  int virtual_key;
16  public:
22  KeyPressEvent(int _vk)
23  {
24  virtual_key = _vk;
26  }
27 
34  {
35  return virtual_key;
36  }
37  };
38 }
Blam::Events::Event::event_type
EventType event_type
The type of the event.
Definition: Event.hpp:18
Blam::Events::Event
Class representing a generic event.
Definition: Event.hpp:13
Blam::Events::KeyPressEvent::KeyPressEvent
KeyPressEvent(int _vk)
Constructs a new event.
Definition: KeyPressEvent.hpp:22
Blam::Events
Namespace for handling things related to Events.
Definition: CharacterInputEvent.hpp:5
Blam::Events::KeyPressEvent::GetVirtualKey
int GetVirtualKey()
Retrieves the virtual key code that was pressed.
Definition: KeyPressEvent.hpp:33
KeyPress
@ KeyPress
Definition: events.h:7
Blam::Events::KeyPressEvent
Class representing a virtual key press.
Definition: KeyPressEvent.hpp:12