Thanks for the answers.
That helped quite a bit.
Urikol wrote:
I tried the code you suggested... I got too many errors no matter what I did. Chances are I did it wrong or put the codes in the wrong scripts or whatnot though... OTL
I'll just try to replace your code that you had in the first place so you can try pasting a whole new thing in its place. Just in case its still not what you're going for, for future reference, I have a couple more questions.
Is there a reason you want the Main Menu to be a label instead of a screen? I'm going to give you a code where it's a screen (because I'm more used to them), but if that is a problem I'll see if I can do something with a label.
Is there a reason why you want your main menu in the options script instead of the screens script?
Do you already have your animated images defined? My defined images are going to be in my example code just in case you want reference for them too.
Did you delete the code for the main menu screen in the screens script so it doesn't interfere?
Alright. Just finished making a mockup menu on my end. Here's the code I used at the bottom of the options script. If this is the kind of thing you're going for, you can literally just paste it over the entire code you had in your first post. Of course, you'll need to replace all of the image names and such with your own.
Code: Select all
image Play_hover = Animation("Play h 1.png", .15, "Play h 2.png", .15, "Play h 3.png", .15)
image Load_hover = Animation("Load h 1.png", .15, "Load h 2.png", .15, "Load h 3.png", .15)
image Options_hover = Animation("Options h 1.png", .15, "Options h 2.png", .15, "Options h 3.png", .15)
image Quit_hover = Animation("Quit h 1.png", .15, "Quit h 2.png", .15, "Quit h 3.png", .15)
screen main_menu:
tag menu
add "Test BG.jpg"
imagebutton idle "Play idle.png" hover "Play_hover" xpos 4 ypos 500 focus_mask True action Start()
imagebutton idle "Load idle.png" hover "Load_hover" xpos 204 ypos 500 focus_mask True action ShowMenu("load")
imagebutton idle "Options idle.png" hover "Options_hover" xpos 404 ypos 500 focus_mask True action ShowMenu("preferences")
imagebutton idle "Quit idle.png" hover "Quit_hover" xpos 604 ypos 500 focus_mask True action Quit(confirm=False)
Just to give you a better idea of what I did, here are the images I used for my test menu.
These were the images for the Load button. The Start, Options, and Quit buttons were pretty much the same aside from the lettering.
- Load idle.png (1.41 KiB) Viewed 6827 times
- Load h 1.png (2.66 KiB) Viewed 6827 times
- Load h 2.png (2.66 KiB) Viewed 6827 times
- Load h 3.png (2.67 KiB) Viewed 6827 times
This was the background I used:
And if you want to see it in action and check out the script and files some more, here's the test game I made with it:
Let me know if you have any questions! Hopefully this one will work out for you. ><