Thread: [TEC] Help for a Slide rule
View Single Post
Old 01-16-24, 10:42 PM   #1
Dönitz78
Bosun
 
Join Date: Sep 2021
Posts: 64
Downloads: 327
Uploads: 0


Default Help for a Slide rule

I have a problem for add a slide rule.

All is fine and great, but one last thing I miss is having horizontal sliding and not rotation.

I think my problem comes from here:

Quote:
def AttackDiskBack_MouseWheelEvent( rotatecw ):
rv = pi / 360.0

global tdwmouse
if tdwmouse == None:
return

if tdwmouse.GetMouseButtons()[ 1 ] > 0:
rv *= 4
else:
rv *= 0.5

if rotatecw:
rv = -rv

if Menu.MenuKeyManager.IsKeyPressed( MenuKeyManagerWrapper.Keys.Shift ):
PageTDC_AttackDisk_Back_SpeedAndDistance.Rotation += rv
elif Menu.MenuKeyManager.IsKeyPressed( MenuKeyManagerWrapper.Keys.Ctrl ):
PageTDC_AttackDisk_Back_Time.Rotation += rv
elif Menu.MenuKeyManager.IsKeyPressed( MenuKeyManagerWrapper.Keys.Alt ):
PageTDC_AttackDisk_Back_Degrees.Rotation += rv
If someone knows how I could replace the "rotation" with only horizontal sliding (<-->) that would help me enormously!
Dönitz78 is offline   Reply With Quote