Improved scroll area, especially for touch devices

This commit is contained in:
Yousef Khadadeh 2026-04-29 12:38:40 +03:00
parent 826efee7fb
commit 6a05026f85
12 changed files with 271 additions and 133 deletions

View file

@ -710,6 +710,7 @@ void GUIManager::input_mouse_button_callback(InputManager::MouseButtonCallbackAr
void GUIManager::input_mouse_motion_callback(InputManager::MouseMotionCallbackArgs motion) {
if(motion.deviceType != InputManager::MouseDeviceType::TOUCH) {
motion.pos /= io.guiScaleMultiplier;
motion.move /= io.guiScaleMultiplier;
mouse_callback(motion.pos, [&motion] (ElementContainer* e) { e->elem->input_mouse_motion_callback(motion); });
}
}
@ -726,6 +727,7 @@ void GUIManager::input_finger_touch_callback(InputManager::FingerTouchCallbackAr
void GUIManager::input_finger_motion_callback(InputManager::FingerMotionCallbackArgs motion) {
motion.pos /= io.guiScaleMultiplier;
motion.move /= io.guiScaleMultiplier;
mouse_callback(motion.pos, [&motion] (ElementContainer* e) { e->elem->input_finger_motion_callback(motion); });
}