realbasic-nug
[Top] [All Lists]

Re: Mouse Clicks with a running sprite surface?

To: REALbasic Network Users Group <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Mouse Clicks with a running sprite surface?
From: Chris Dillman <chrisd at plaidworld dot com>
Date: Tue, 29 May 2001 10:49:04 -0500
At 10:00 AM -0500 5/29/01, Chris Dillman wrote:

can you get mouse clicks with a running sprite surface?

Yes, just use the Window's MouseDown event.



Ok thanks everyone.


I had run upon some old notes last night saying you could not do this...
Love the web don't you :-)


or call a function like Button() // C++

Yes, System.MouseDown.

and then get the mouse X/Y...

Window.MouseX and Window.MouseY.

I do not want to run a sprite withe a thread/timer
which shares CPU time better but runs like 5+ FPS or more slower.

I highly recommend running it from a timer nonetheless.

Timer?

My test ( I think ) showed.

surface.run = fastest
thread calling update slower
timer calling update slower then thread.

right now I have 2 mode for the IDE one being
surface.run when in stand alone player mode
and one in threaded mode when the IDE is being used for scripting
and game development.



--

===========================================================
Technical Editor for http://www.idevgames.com
Support Programmer for http://www.desoftware.com
Owner, Plaid World Studios, http://www.plaidworld.com
Software Engineer for http://www.riskwise.com, Part of LexisNexis

A one-question geek test. If you get the joke, you're a geek:
Seen on a California license plate on a VW Beetle: "FEATURE"

============================================================



<Prev in Thread] Current Thread [Next in Thread>