mirror of
https://github.com/celisej567/mcpe.git
synced 2026-09-04 19:36:43 +03:00
* Initial commit.
:)
This commit is contained in:
15
source/UserInput/Keyboard.cpp
Normal file
15
source/UserInput/Keyboard.cpp
Normal file
@@ -0,0 +1,15 @@
|
||||
#include "Keyboard.hpp"
|
||||
|
||||
std::vector<Keyboard::Input> Keyboard::_inputs;
|
||||
int Keyboard::_index = -1;
|
||||
int Keyboard::_states[256];
|
||||
|
||||
void Keyboard::feed(int down, int key)
|
||||
{
|
||||
Input i;
|
||||
i.field_0 = down;
|
||||
i.field_4 = uint8_t(key);
|
||||
_inputs.push_back(i);
|
||||
|
||||
_states[key] = down;
|
||||
}
|
||||
Reference in New Issue
Block a user