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 Professional Discussion / Image Clear Help (Menus)

Author
Message
x_THOR_x
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location:
Posted: 18th Nov 2011 04:13
I had an example menu for a while that I found in the code database here. I have been messing around with it but I am having some trouble. When I click on the START button it loads a 2nd menu but if I move my mouse over the screen the buttons from the first menu screen show through the 2nd menu screen. I cant figure out how to stop this, I tried everything I could think of. Is there a way to CLEAR the images from the first menu once the user makes a selection?

Pincho Paxton
23
Years of Service
User Offline
Joined: 8th Dec 2002
Location:
Posted: 18th Nov 2011 13:24
At a quick glance it looks like the program uses t to pick which images to paste. So t needs to be increased for each menu... as far as I can tell.

x_THOR_x
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location:
Posted: 19th Nov 2011 05:40
Im not quite sure what you mean but I will keep trying.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2011 09:37
A lot of that looks like my code. Do you remember which message you got that from? If you repaste the background image all will be cleared.

It's actually easier to use SPRITEs instead so you don't use PASTE IMAGE and overwrite the background image. If you use SPRITEs you change the image number used and the background remains intact.

x_THOR_x
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location:
Posted: 19th Nov 2011 17:19
I got it from the Code Database a while ago.

http://www.thegamecreators.com/?m=codebase_view&i=5a0b2048565c568ac987a79da71b1c54
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2011 17:53
Did you make new backgrounds that cover the entire screen size you want to use? If it doesn't fully cover the screen it won't look right. Can you post your modified media?

x_THOR_x
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location:
Posted: 19th Nov 2011 21:54
Here is what I have so far. Images also attached.
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 19th Nov 2011 22:59
One of the things I put in the original that your version doesn't have is the words on the background of the non-selected menu items. Without words the user won't know what's there unless they move the mouse over the menu items that cannot be seen. The attached image is what you should be using for your title screen instead (I just threw it together so it's not perfect).

Those menu item images really need to have a transparent background so you don't see the red background in them.

x_THOR_x
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location:
Posted: 21st Nov 2011 03:54 Edited at: 21st Nov 2011 03:55
Ok I got that fixed. I decided to get rid of the LOAD option for now. I just have a START and EXIT option. But now when I move the mouse over the exit option, nothing happens and if I click it, it doesnt work.

Attachment Uploaded
Grog Grueslayer
Valued Member
21
Years of Service
User Offline
Joined: 30th May 2005
Playing: Green Hell
Posted: 21st Nov 2011 07:21
It's because you changed the STEP 2 to STEP 4 in the FOR/NEXT loop checking for the buttons. It's at STEP 2 because it skips every other image number because the first image is the mouse hover image and the next one after that is the clicked image. The exit image is a bit off because each image needs to be exactly the same size for it to line up properly.



x_THOR_x
19
Years of Service
User Offline
Joined: 26th Feb 2007
Location:
Posted: 25th Nov 2011 03:36
Thank you very much Grog, I see where I got stuck now.
Thank you again.

Login to post a reply

Server time is: 2026-07-10 01:59:17
Your offset time is: 2026-07-10 01:59:17