In this section, I will show you how to create a Game Menu for this Platformer game. In this part I will show you some new nodes of Godot’s UI.
| Join the channel Telegram of the AnonyViet 👉 Link 👈 |
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 30 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating Menus](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-27-01.png)
Then the first thing is you create yourself a new scene with the Control Node as the root node and rename it to Menu.
And add a new node that is Vboxcontanier.
VBoxContainer: this is the node that will create an area like a container and it will make the nodes inside it all arranged in vertical order.
HBoxContainer: Hbox is the opposite of Vbox in that it is arranged horizontally.
If you notice, there are letters V and H at the beginning of the name, and this V – H is the name of the two horizontal and vertical axes in English.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 31 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating a 27 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-26-08.png)
Then you select Layout at the bottom of the toolbar and select full rect![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 32 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating a 28 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-42-43.png)
After you select full rect it will look like this.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 33 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating a 29 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-43-25.png)
I will rename it for easy identification.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 34 [Tạo 2D Platformer Game với Godot] Part 17: Creating a 30 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-44-09.png)
And I added 2 more Vbox and renamed it 1 PhanDau and 1 PhanCuoi.
About the reason I added these 2 is because I want PhanDau to be the part I will add Text to VD like game name.vv. As for PhanCuoi, I will add a button to click.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 36 [Tạo 2D Platformer Game với Godot] Part 17: Creating a 32 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-46-08.png)
I will add 1 more node Hbox and rename it TieuDe.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a Menu 37 [Tạo 2D Platformer Game với Godot] Part 17: Creating a 33 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-46-19.png)
Since I want to create a game title, I will use a node that allows me to display the text that is Labels.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 38 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 34](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-46-38.png)
To the right there is a text box.![[Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 39 [Tạo 2D Platformer Game với Godot] Part 17: Creating a 35 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-46-51.png)
And your label will be moved to the left corner that you want to move to the right, ah and you can’t manually adjust it.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 41 [Tạo 2D Platformer Game với Godot] Part 17: Creating a Menu 37](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-47-11.png)
To adjust, select the TieuDe node in the Inspector and select Center in Aligment.![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 42 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating a 38 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-47-30.png)
It will then be moved to the middle![[Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 43 [Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 39](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-51-05.png)
If you pay attention, you can see that the TieuDe is close to the top of the screen so I will make it wider.
You add a node called NinePatchRect (and put it at the top), then here you can use another node to create space like Vbox, etc. Here, I just choose great.![[Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 44 [Tạo 2D Platformer Game với Godot] Part 17: Creating a 40 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-51-22.png)
In the Rect section of NinePatchRect you adjust the Min Size to 50.
Note the adjustment at Min size, not size because there are some cases of size adjustment, but it will reset to the original size.![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 45 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 41](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-51-34.png)
After adjustment.![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 46 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating a 42 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-55-12.png)
Next is the button part. Like Tiude, I add an Hbox and add a node that allows us to press the button that is Button.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a Menu 47 [Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 43](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-56-25.png)
I rename again.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 48 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 44](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-57-02.png)
You will have to align it to the center like you did with Tieude.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 50 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating a 46 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-57-19.png)
I added NinePatchRect to create space.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating a 52 . Menu [Tạo 2D Platformer Game với Godot] Part 17: Creating a 48 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-12-59-27.png)
Similarly, I added an exit button to the game.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating Menu 53 [Tạo 2D Platformer Game với Godot] Part 17: Creating a 49 . Menu](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-01-00-59.png)
Save the scene in a new folder named UI.
![[Tạo 2D Platformer Game với Godot] Part 17: Creating Menus [Tạo 2D Platformer Game với Godot] Part 17: Creating Menus](https://anonyviet.com/wp-content/uploads/2021/11/19-11-2021-01-01-47.png)
summary
So in this part, I showed you how to create a basic menu for the game.










