Make the OpenGl Gadget the EventGadget() programmatically?
Posted: Thu Mar 12, 2020 6:39 am
If I'm viewing/updating info in a Tool Window, I'd like to just use the key shortcuts in the OGL Gadget (Main Window) without first having to click in it with the mouse. I have tried a fake mouse click:
It, and my other poorly considered ideas, do not work because I have a chicken-and-egg situation:
[/size]
........... but it must be possible?
Code: Select all
Macro Macro_MouseClick
;#--------------------
mouse_event_(#MOUSEEVENTF_LEFTDOWN,0,0,0,0)
mouse_event_(#MOUSEEVENTF_LEFTUP,0,0,0,0)
EndMacroCode: Select all
Select EventGadget()
Case #OpenGlGadget
Select EventType()
Case #PB_EventType_KeyDown
igKey = GetGadgetAttribute(#OpenGlGadget, #PB_OpenGL_Key)
Select igKey
Case #PB_Shortcut_Up: CameraIncrementRotationX(-2, 100)
Case #PB_Shortcut_Down: CameraIncrementRotationX(2, 100)
Case #PB_Shortcut_Left: CameraIncrementRotationY(2, 100)
Case #PB_Shortcut_Right: CameraIncrementRotationY(-2, 100)
Case #PB_Shortcut_Subtract: CameraZooming(0)
Case #PB_Shortcut_Add: CameraZooming(1)
EndSelect
EndSelect
EndSelect........... but it must be possible?