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.

Newcomers DBPro Corner / Short menu for DBP

Author
Message
Skulduggery
13
Years of Service
User Offline
Joined: 23rd Nov 2010
Location:
Posted: 23rd Nov 2010 22:16 Edited at: 23rd Nov 2010 22:26
i am currently working on making a painting program similar to microsoft paint, but all the menus i have seen are too complicated. I simply need a menu that will be able to register when the mouse is over the button (to highlight it) and then change some variables when i click the button.
Skulduggery
13
Years of Service
User Offline
Joined: 23rd Nov 2010
Location:
Posted: 23rd Nov 2010 22:31
I have already created a basic painting program which allows you to either control it with the arrow keys or mouse, but a drop-down menu for the options would look nicer. I have been searching through a few of the tutorials and have come up with nothing.
baxslash
Valued Member
Bronze Codemaster
17
Years of Service
User Offline
Joined: 26th Dec 2006
Location: Duffield
Posted: 24th Nov 2010 10:56
One way is to use sprites for your buttons and constantly position a transparent 1x1 pixel sprite at the mouse position. Then you check for a collision between your mouse sprite and a button sprite using "sprite collision" (I think)... if a collision is detected you can then check for mouseclicks or change the image on "mouseover".

Have a try. If you get stuck post your work here and I'll try to help!

To get you started I've attached a 1x1 transparent pixel for your mouse sprite.

Attachments

Login to view attachments

Login to post a reply

Server time is: 2024-09-29 00:20:13
Your offset time is: 2024-09-29 00:20:13