~ fixed compiler errors (KeyCode)

This commit is contained in:
Julian Hinxlage 2019-11-26 15:57:54 +01:00
parent 880b4c1985
commit 818ebcdb43
2 changed files with 5 additions and 5 deletions

View File

@ -20,7 +20,7 @@
*/
class GUI_Window : public Fl_Window {
int x, y, button;
vkvm::KeyCode* keyCode;
vkvm::KeyCode keyCode;
int handle(int e);
char* position_to_string(int x,int y);
public:

View File

@ -45,16 +45,16 @@ auto GUI_Window::handle(int e) -> int {
/*keyboardbutton*/
case FL_KEYBOARD:
button = Fl::event_button();
keyCode = new vkvm::KeyCode(button);
vkvm::buttonPressed(*keyCode);
keyCode = vkvm::KeyCode(button);
vkvm::buttonPressed(keyCode);
vkvm::callEvent(vkvm::EventType::KeyDown);
this->child(2)->label("Event:Key Down");
return 1;
case FL_KEYUP:
button = Fl::event_button();
std::cout<<button<<std::endl;
keyCode = new vkvm::KeyCode(button);
vkvm::buttonPressed(*keyCode);
keyCode = vkvm::KeyCode(button);
vkvm::buttonPressed(keyCode);
vkvm::callEvent(vkvm::EventType::KeyUp);
this->child(2)->label("Event:Key Up");
return 1;