About Store Forum Documentation Contact



Post Reply 
Holding down mouse button
Author Message
Tristan Offline
Member

Post: #1
Holding down mouse button
Is there a way to tell if a mouse button is being held down? I know there is a mouse button click function, but is there any functionality to tell if a mouse button is being held down?

Thanks!
12-12-2010 01:05 AM
Find all posts by this user Quote this message in a reply
Chris Offline
Member

Post: #2
RE: Holding down mouse button
if (Ms.b(0)) {
// Lightbulb?
}

In the headers you also get:

Bool b (Int x) {return BUTTON_ON(button[x]);} // if button 'x' on
Bool bp(Int x) {return BUTTON_PD(button[x]);} // if button 'x' pushed
Bool br(Int x) {return BUTTON_RS(button[x]);} // if button 'x' released
Bool bd(Int x) {return BUTTON_DB(button[x]);} // if button 'x' double clicked
12-12-2010 01:11 AM
Find all posts by this user Quote this message in a reply
Tristan Offline
Member

Post: #3
RE: Holding down mouse button
Thank you very much Chris!
12-12-2010 01:21 AM
Find all posts by this user Quote this message in a reply
Post Reply