Emulate touch events as mouse button events in layoutelement

This commit is contained in:
Yousef Khadadeh 2026-04-28 20:28:21 +03:00
parent 973014cb5f
commit 4c30939882
6 changed files with 33 additions and 11 deletions

View file

@ -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();
}