In this part, it is a fork, which means it will not be very related to the main game making, but I think there will still be people who need it.
| Join the channel Telegram of the AnonyViet 👉 Link 👈 |
Then in this section, I will show you how to add scrolling buttons for those who plan to export the game to mobile.
Art
The first part will be the art part, you can download it for yourself at the following link: Onscreen controls (8 styles)
![[Tạo 2D Platformer Game với Godot] Part 8.1: Add 23 . scroll button [Tạo 2D Platformer Game với Godot] Fork part 1: Add a move button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-19-56.png)
You create yourself a new folder named GUI in the Assets folder.
![]()
In the GUI folder create an additional Buttons folder (this is where the buttons are).
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 25 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 21 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-24-24.png)
Then open the zip file you just downloaded into Sprites.
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 26 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding 22 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-24-35.png)
UnshadedDark.
![[Tạo 2D Platformer Game với Godot] Part 8.1: Add 27 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Add 23 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-25-22.png)
Copy yourself photos 24,25,26 and put them in the Buttons folder.
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 28 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding 24 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-25-44.png)
As above is fine.
Knot
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 29 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 25 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-29-09.png)
Next, you go through the Player’s scene and add yourself a new node, TouchScreenButton (this is a dedicated touch screen button for mobile games).
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 30 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 26 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-30-31.png)
Then I created 3 more TouchScreenButton nodes and renamed it Quatrai, Quaphai and Nhay respectively. Each name has its own meaning.
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 31 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Add 27 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-33-01.png)
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 32 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 28 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-33-45.png)
Here I select the button to the left then I drag the image to Normal so it shows the button. At the thường is the image when it is normal, and the Pressed is the image when you click.
You can make it more detailed by clicking the button and the image will be darker or lighter to let the user know they have clicked.
The Action is the same action as on the code Input.is_action_pressed(“ui_left”) or something but here you just need to fill it in and then click it automatically. And if on the code you use the above actions, when you click it, it will run that action on the code.
![[Tạo 2D Platformer Game với Godot] Part 8.1: Add 33 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 29 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-37-55.png)
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 34 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 30 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-37-02.png)
I adjusted for the other 2.
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 35 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 31 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-39-11.png)
Oh, you guys add a new node called CanvasLayer
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 36 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 32 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-39-45.png)
Then I will rename as GUI and leave the other 3 nodes in.
The reason I do that is because when you leave the other 3 nodes outside, it’s like the other nodes will move as usual, but if you leave them inside CanvasLayer then it will only show up in the UI section.
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 37 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Add 33 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-41-17.png)
Mine already shows up, but you’re sure clicking it won’t work unless you run the mobile game test
![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 38 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 34 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-42-08.png)
Therefore, you go to Project -> Project Settings -> Find Pointing.![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 39 . scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a 35 . scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-42-17.png)
Then tick the one on the image to be able to click.![[Tạo 2D Platformer Game với Godot] Part 8.1: Adding a scroll button [Tạo 2D Platformer Game với Godot] Part 8.1: Adding a scroll button](https://anonyviet.com/wp-content/uploads/2021/11/12-11-2021-10-43-51.png)
Then run the game and enjoy.
You should also adjust the move button so that it fits your eyes.
Summary
So in this part, I showed you how to add a scroll button in the Game.










