How to achieve Drag-rotation/knob-rotation in GDevelop

How to make a image drag-rotate like shown here

When click is pressed, create an invisible bar at the center of the button. One end is stuck there, and the other end follows the cursor.
Then you should be able to apply the angle change of the bar to the angle of the knob.