Emulate touch events as mouse button events in layoutelement
This commit is contained in:
parent
973014cb5f
commit
4c30939882
6 changed files with 33 additions and 11 deletions
|
|
@ -493,7 +493,7 @@ void DrawingProgram::right_click_action_menu(Vector2f popupPos, const std::funct
|
|||
innerContent();
|
||||
}
|
||||
}, LayoutElement::Callbacks{
|
||||
.mouseButton = [&](LayoutElement* l, const InputManager::MouseButtonCallbackArgs& button) {
|
||||
.onClick = [&](LayoutElement* l, const InputManager::MouseButtonCallbackArgs& button) {
|
||||
if(button.down && button.button != InputManager::MouseButton::RIGHT && !l->mouseHovering)
|
||||
clear_right_click_popup();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue