Creating menu

For my game I have decided to watch a few menu tutorials in order to get to grips with the basics.

option-and-menu-widgetTo start I created a UI folder with two user interface widgets which I called Menu and options.

main-menu-screenThen I added a horizontal box, changing the text and making sure it is aligned to where I want it on the screen.

adding-buttonI then added a vertical box with a size box wrapped around allowing me to align the buttons in the middle.

adjusting-padding-top

Here I added a button and called it play. I also changed the padding in order to space out the text from the top of the button.

simple-menu-layout

I then added two more buttons as a template for the menu. The Quit button is not necessary for a mobile game, and the whole layout will most likely be changed, but for prototype purposes the layout will suffice.

widget-blueprintThis is the widget blueprint which determines what happens when a button is pressed.

play-clickThe open level node allows you to say where you want the button to take you, which in this case takes you to the level.

menu-code-2Here is the code for the menu which connects the player controller to the menu widget, allowing them to press the buttons.

Main menu in game.JPGHere is the main menu up to now.

The menu as of now is at the bare basics and needs a lot more work aesthetically, along with functionality such as what buttons needs to be on there and how much space they deserve on the limited screen space. I am also having problems when I click play. When pressed the game comes on but the controls do not work, so I believe it has something to do with this code –

Problem with code.JPG

Still, I do not know for sure so I will continue to troubleshoot to find the problem.

Update – 

I have solved the control problem by adding this code

Control issue solved.JPG

This allows it to change from the menu controls to the game input controls solving issue of not being able to jump.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s