Blamite Game Engine - blam!  00296.01.12.21.0102.blamite
The core library for the Blamite Game Engine.
KeyPressEvent.h
Go to the documentation of this file.
1 #pragma once
2 
3 #include "../BlamEvent.h"
4 
5 #include <sdl2/SDL_keyboard.h>
6 
12 class KeyPressEvent : public BlamEvent
13 {
14 private:
15  SDL_Keycode key;
16 
17 public:
23  KeyPressEvent(SDL_Keycode _vk);
24 
30  int GetVirtualKey();
31 };
KeyPressEvent
Class representing a virtual key press.
Definition: KeyPressEvent.h:12
BlamEvent
Class representing a generic event.
Definition: BlamEvent.h:20
KeyPressEvent::GetVirtualKey
int GetVirtualKey()
Retrieves the virtual key code that was pressed.
Definition: KeyPressEvent.cpp:8
KeyPressEvent::KeyPressEvent
KeyPressEvent(SDL_Keycode _vk)
Constructs a new event.
Definition: KeyPressEvent.cpp:3