~ fixed compiler errors (KeyCode)
This commit is contained in:
parent
880b4c1985
commit
818ebcdb43
@ -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:
|
||||
|
@ -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;
|
||||
|
Loading…
Reference in New Issue
Block a user