Triquad puzzle game
#6
(05-19-2022, 03:41 PM)Rick3137 Wrote: Thanks Mark

I'm glad I found it. Good Forums are getting hard to find.

A more stable way to poll the mouse = update mouse x, y and buttons:
Code: (Select All)
        While MouseInput: Wend ' <<<< this updates mouse x, y and buttons internally for the loop
        mx = MouseX  ' now just capture updates into variables mx, my, btn or mb1
        my = MouseY
        btn = MouseButton(1)
        If btn Then
            If my > 100 And my < 280 Then row = 1
            If my > 300 And my < 480 Then row = 2
            If my > 500 And my < 680 Then row = 3
            If mx > 50 And mx < 230 Then column = 1
            If mx > 250 And mx < 430 Then column = 2
            If mx > 450 And mx < 630 Then column = 3
            If mx > 700 And mx < 880 Then column = 4
            If mx > 900 And mx < 1080 Then column = 5
            If mx > 1100 And mx < 1280 Then column = 6
            If column = 0 Then row = 0
            If row = 0 Then column = 0
            getzone
            _Delay .2 ' for user to release button  ' this waits for user to release mouse button before processing 
            mousereleased = 1 ' now you can assume it's released and go ahead
        End If
so don't need this,
Code: (Select All)
        'If btn = -1 Then
        '    mousereleased = 1

        'Else
        '    mousereleased = 0
        'End If

wow 3 mouse pollings in 3 main loops, yikes!
b = b + ...
Reply


Messages In This Thread
Triquad puzzle game - by Rick3137 - 05-18-2022, 09:25 PM
RE: Triquad puzzle game - by Helium5793 - 05-19-2022, 01:45 PM
RE: Triquad puzzle game - by Rick3137 - 05-19-2022, 01:53 PM
RE: Triquad puzzle game - by bplus - 05-19-2022, 03:18 PM
RE: Triquad puzzle game - by Rick3137 - 05-19-2022, 03:41 PM
RE: Triquad puzzle game - by bplus - 05-19-2022, 04:12 PM
RE: Triquad puzzle game - by Dav - 05-19-2022, 04:53 PM



Users browsing this thread: 1 Guest(s)