fix flag_drag

This commit is contained in:
Shaohua Tong 2019-11-29 14:48:31 +01:00
parent 5747b8b5fb
commit 44658873a3

View File

@ -43,13 +43,18 @@ auto GUI_Window::handle(int e) -> int {
this->child(3)->label(position_to_string(x,y));
if (Fl::event_button() == FL_LEFT_MOUSE) {
this->child(2)->label("Event:Mouse Left Drag");
vkvm::callEvent(vkvm::EventType::MouseLeftDown);
vkvm::callEvent(vkvm::EventType::MouseMove);
} else if (Fl::event_button() == FL_RIGHT_MOUSE) {
this->child(2)->label("Event:Mouse Right Drag");
vkvm::callEvent(vkvm::EventType::MouseRightDown);
vkvm::callEvent(vkvm::EventType::MouseMove);
} else {
this->child(2)->label("Event:Mouse Middle Drag");
vkvm::callEvent(vkvm::EventType::MouseMiddleDown);
vkvm::callEvent(vkvm::EventType::MouseMove);
}
vkvm::callEvent(vkvm::EventType::MouseLeftDown);
vkvm::callEvent(vkvm::EventType::MouseMove);
return 1;
/*Mousemovement*/
case FL_MOVE: