rotate image using mouse

BlitzMax Forums/BlitzMax Programming/rotate image using mouse

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Graphics 800,600
SetColor 255,255,255

'SetOrigin(GraphicsWidth()/2,GraphicsHeight()/2)
HideMouse()

Local varx : Float
Repeat

SetRotation ATan2((MouseY()-GraphicsWidth()/2), MouseX()-(GraphicsHeight()/2))
varx = GetRotation()
DrawText "rotation = " + String(varx), GraphicsWidth()/2,GraphicsHeight()/2
Flip
Cls

Until KeyHit(key_escape) = 1