Separated color picker element into 3 different GUI elements

This commit is contained in:
Yousef Khadadeh 2026-05-02 22:00:00 +03:00
parent 515b591ee8
commit b5d4c38024
16 changed files with 599 additions and 219 deletions

View file

@ -624,6 +624,24 @@ void InputManager::backend_pen_axis_update(const SDL_PenAxisEvent& e) {
}
}
InputManager::MouseButtonCallbackArgs InputManager::convert_finger_touch_to_mouse_button(const FingerTouchCallbackArgs& touch) {
return {
.deviceType = InputManager::MouseDeviceType::TOUCH,
.button = InputManager::MouseButton::LEFT,
.down = touch.down,
.clicks = static_cast<uint8_t>(touch.fingerTapCount),
.pos = touch.pos
};
}
InputManager::MouseMotionCallbackArgs InputManager::convert_finger_motion_to_mouse_motion(const FingerMotionCallbackArgs& motion) {
return {
.deviceType = InputManager::MouseDeviceType::TOUCH,
.pos = motion.pos,
.move = motion.move
};
}
std::vector<Vector2f> InputManager::get_multiple_finger_positions() {
std::vector<Vector2f> pos;
for(const SDL_TouchFingerEvent& fingerEvent : touch.fingers)