Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Mouse wheel
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
Raknarg




PostPosted: Fri Jan 20, 2012 4:31 pm   Post subject: Mouse wheel

Is there a way to detect mouse wheel scrolling?
Sponsor
Sponsor
Sponsor
sponsor
Zren




PostPosted: Fri Jan 20, 2012 5:52 pm   Post subject: RE:Mouse wheel

There's nothing in the Mouse module, and the GUI module doesn't use it, so nope.
Alex C.




PostPosted: Fri Jan 20, 2012 6:05 pm   Post subject: RE:Mouse wheel

actually, someone who made forces (windsurfer) incorporated the mouse wheel (as well as the right button) into their game.

im not sure how but it's possible (and the source code for forces is out there)
Raknarg




PostPosted: Fri Jan 20, 2012 6:51 pm   Post subject: RE:Mouse wheel

Yeah, theres probs a way to do it.. I know for a fact that someone made a module to use a joypad, so it has o be possible
Alex C.




PostPosted: Fri Jan 20, 2012 7:42 pm   Post subject: RE:Mouse wheel

also, do you mean scrolling or clicking with the wheel?
Raknarg




PostPosted: Fri Jan 20, 2012 7:49 pm   Post subject: RE:Mouse wheel

scrolling, like my first post said
Alex C.




PostPosted: Fri Jan 20, 2012 7:49 pm   Post subject: RE:Mouse wheel

by the way, "Retro Shooter" might have mouse scrolling in it's code somewhere...
http://compsci.ca/v3/viewtopic.php?t=21371
copthesaint




PostPosted: Sat Jan 21, 2012 10:06 am   Post subject: Re: Mouse wheel

Turing:
Mouse.ButtonChoose ("multibutton")
        var x, y, button, left, middle, right : int
        Mouse.Where (x, y, button)
        left := button mod 10           % left = 0 or 1
        middle := (button - left) mod 100   % middle = 0 or 10
        right := button - middle - left     % right = 0 or 100
        if left = 1 then
            put "left button down"
        end if
        if middle = 10 then
            put "middle button down"
        end if
        if right = 100 then
            put "right button down"
        end if


Zren wrote:

There's nothing in the Mouse module, and the GUI module doesn't use it, so nope.

You know is your heart that you should have searched for it Wink
Sponsor
Sponsor
Sponsor
sponsor
Alex C.




PostPosted: Sat Jan 21, 2012 2:31 pm   Post subject: RE:Mouse wheel

huh, that's actually pretty useful! Very Happy
Dreadnought




PostPosted: Sat Jan 21, 2012 2:37 pm   Post subject: Re: Mouse wheel

Well, actually the functionality is bugged. You can't detect more than one button click on the mouse at a time. See this thread.

Unfortunately, Racknarg is looking for a way to detect scrolling not clicking. Zren is correct Turing does not provide a way of detecting mouse wheel scrolling.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 10 Posts ]
Jump to:   


Style:  
Search: