Dönitz78
01-16-24, 10:42 PM
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:
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!
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:
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!