Sorry your browser is not supported!

You are using an outdated browser that does not support modern web technologies, in order to use this site please update to a new browser.

Browsers supported include Chrome, FireFox, Safari, Opera, Internet Explorer 10+ or Microsoft Edge.

Dark GDK / Event Click

Author
Message
DARKGDK
14
Years of Service
User Offline
Joined: 23rd Oct 2009
Location:
Posted: 27th Oct 2009 09:11
Hi,

How to intercept the event click on Image or Sprite ?
It's possible ?

regard
Zotoaster
19
Years of Service
User Offline
Joined: 20th Dec 2004
Location: Scotland
Posted: 27th Oct 2009 14:30
If you know the position and size of the image, you just have to check it against the coordinates of the mouse:



"everyone forgets a semi-colon sometimes." - Phaelax
SFCBias
15
Years of Service
User Offline
Joined: 8th Aug 2009
Location: Hephzibah, GA, USA
Posted: 29th Oct 2009 21:10
heres a good button class using sprites

http://forum.thegamecreators.com/?m=forum_view&t=158074&b=22&msg=1857330#m1857330

if(You.AddCode.toPost)TGC.Users.CanHelp = true;
else return NoCodeMessage;

Login to post a reply

Server time is: 2024-10-01 16:31:08
Your offset time is: 2024-10-01 16:31:08