AppGameKit doesn't strictly have a function for this... in essence you can Get Information from I/O Devices., but not Set Information.
This isn't because it isn't possible to do this., but as a key thing to remember; it's typically a BAD idea to do this.
Now how you go about "Solving" this, really depends on WHY you need this Functionality.
do
Print( ScreenFPS() )
Print( GetMilliseconds() )
If GetMouseClick( 2, 250 ) // Right-Click, every 1/4 Second
DrawBox( 10, 10, 250, 250, MakeColor( 255, 0, 0 ), MakeColor( 255, 0, 0 ), MakeColor( 255, 0, 0 ), MakeColor( 255, 0, 0 ), 1 )
Else
DrawBox( 10, 10, 250, 250, MakeColor( 32, 32, 32 ), MakeColor( 32, 32, 32 ), MakeColor( 32, 32, 32 ), MakeColor( 32, 32, 32 ), 1 )
EndIf
Sync()
loop
Function GetMouseClick( Button As Integer, Frequency As Integer )
Select Button
// Button Left
Case 1 :
If GetRawMouseLeftState()
If ( GetMilliseconds() > Frequency )
ResetTimer()
ExitFunction -1
EndIf
EndIf
EndCase
// Button Right
Case 2 :
If GetRawMouseRightState()
If ( GetMilliseconds() > Frequency )
ResetTimer()
ExitFunction -1
EndIf
EndIf
EndCase
// Button Middle / Wheel
Case 3 :
If GetRawMouseMiddleState()
If ( GetMilliseconds() > Frequency )
ResetTimer()
ExitFunction -1
EndIf
EndIf
EndCase
// Button Back
Case 4 :
If GetRawMouseFourthState()
If ( GetMilliseconds() > Frequency )
ResetTimer()
ExitFunction -1
EndIf
EndIf
EndCase
// Button Forward
Case 5 :
If GetRawMouseFifthState()
If ( GetMilliseconds() > Frequency )
ResetTimer()
ExitFunction -1
EndIf
EndIf
EndCase
// All other Conditions than 1 - 5
Case Default :
Exit
EndCase
EndSelect
// This should never be reached
EndFunction 0
Now as a note., because I'm not creating a Separate "Timer" Routine; this means we can only do this trick once.
It's actually better to create a Type
That keeps the Previous, Current and Delta Time for each Frame; and then put that into an Array that you can update each Individually without using ResetTimer( )
Instead ONLY use ResetTimer( ) whenever the GetMilliseconds() goes above 2 Billion; but note when you do this... also subtract whatever the time was AT that time from all of your Timers "Last Time"
As this will keep them consistent.
Knowing how to and using Timers is absolutely INVALUABLE as a programming tool.
We can do a similar approach for changing the Mouse Position; remember what we want to do is remove the System Pointer., then use our own Sprite when the Mouse is within the App Window.
In this regard we then have FULL control over it's position, rather than having to emulate updates to the Operating System (which is different on each platform)
It's also not as limiting as just using a Mouse either... we can effectively do this with Touch, Joystick, etc. Controls.
Mind I'd say be VERY careful about taking away control from the User., as this can be quite disorientating and make an App feel "Broken" unless it's intention (i.e. part of a Tutorial where the User has no Control)