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.

DarkBASIC Discussion / DarkBasic Mouse Detection

Author
Message
hubby
20
Years of Service
User Offline
Joined: 29th Jun 2006
Location:
Posted: 29th Jun 2006 17:14
Hello

I am a complete beginner on DarkBasic and have been given the task of creating TIC TAC TOE.
I have made some code..i have made 3 bitmaps (background grid one, a X and a O). I have placed each bitmap as a sprite into the grid and hid each one.
What i want to do is have some code that detects a mouseclick on each sprite so i can sort of say..

If mouseclick() = 1 on Sprite 1 then
show sprite 1
endif

I know thats awful code but thats the sort of thing i need or somethign easy!!...Can someone please help me!!!

Chris
Stora tomtefar
21
Years of Service
User Offline
Joined: 15th Mar 2005
Location: Göteborg, Sweden
Posted: 30th Jun 2006 17:40
I think I know what you mean... Let's say each sprite is 20x20 pixels, apart from the background of course, then I would to something like this:



That would create an visual box around the sprite, and if the player clicks with the mouse while the pointer is inside this box, the sprite is shown.
What thas what you was asking for?

www.godhatessweden.com

My name, Stora_tomtefar, means "big santa claus" in swedish.
Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 30th Jun 2006 18:50
You are posting the same thing over and over again. I think this is the third identical post.

Login to post a reply

Server time is: 2026-07-07 10:12:48
Your offset time is: 2026-07-07 10:12:48