2 buttons
Blitz3D Forums/Blitz3D Beginners Area/2 buttons
| ||
in my game, there's a main menu. on the main menu, there's 2 buttons, a start button and a quit button. both of which are animated so when you click on them, they change size a little bit. the problem is that I have a "if imagesoverlap"... and it seems that only the first in the program seems to work. If the if imagesoverlap for the quit button is right above the if imagesoverlap for the start button, only the quit will work. If the if imagesoverlap for the start button is right above the if imagesoverlap for the quit button, only the start will work. what can I do to fix it? |
| ||
oh, and the other image is the cursor, just incase you need to know |
| ||
It could be the IF..THEN is wrong, or maybe the y-coordinate is misspelled somehow. It could also be a logical problem, like first setting the flag in the first IF, then resetting it in the second one. You could also try drawing some debug output to the screen, like: if imagesoverlap(mouse, image1) then text 0, 0, "button1" if imagesoverlap(mouse, image2) then text 0, 20, "button2" |
| ||
no, I did it all right, tried a debug and it still doesn't work, I'm ok with any changes in the program, so if anybody knows how to do some sort of main menu, with a quit and start button, that would be great if you could tell me -Thanks |
| ||
Here, try this then: |
| ||
thank you very much, bram32! |