• Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
AnonyViet - English Version
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office
No Result
View All Result
AnonyViet - English Version
No Result
View All Result

[Tạo 2D Platformer Game với Godot] Part 19: Designing UI with Custom Styles

AnonyViet by AnonyViet
January 27, 2023
in Tips
0

In this section, I will show you how to design UI for games instead of using other UIs on the net. I will show you how to use it directly in Godot.

Join the channel Telegram of the AnonyViet 👉 Link 👈

Styles

For versions from 3.3 and below, it is called Custom Styles in the Inspector box of a certain node in the Control node.

And in Godot version 3.4 and above, it is located in Theme Overrides -> Styles.

And of course the design of these Control nodes will have two ways:

+ One is that you will use Theme and when you use Theme you adjust at the root node, the child nodes will also be adjusted.

+ Second, you will adjust the own styles of node.

[Tạo 2D Platformer Game với Godot]  Part 17: Designing UI with Custom Styles

Here, I will choose the NutBatDau node to design.
[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 27

In the Inspector panel of the NutBatDau node, select Theme Overrides -> Styles.

You will see 5 lines:

  • Hover: The style of the node when the mouse hovers over the node.
  • Pressed: style when node is clicked.
  • Focus: similar to pressed but when it’s focused
  • Disabled: style when you are disabling this node.
  • Normal: style in the normal state doing nothing.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 28

I will design Normal fish first.

You click [empty] -> New StyleBoxFlat

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 29 [Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 30

You will then see the Button has turned gray and a new line tab appears below Normal.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 31 [Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 32 [Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 33

I will change the Bg Color to green and the Color id here I have is 41d822.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 34

Next I will go to Conner Radius to adjust the corner radius.

If you adjust it to high, the corner will be rounded again.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 35[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 36

This is after I set the Corner Radius to 8.

But the Button is quite small and the text is close to the node, so it is not very beautiful.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 37

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 38[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 39[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 40Therefore, I will go through the rect part and adjust it to a reasonable min size.

Remember to adjust at min size, not in size, if you adjust in size when running the game it will still reset to the old size.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 41

Next, I will add the outside details = how to apply Blend at the Border and adjust the color to make it reasonable. Here my color is: 385831.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 42

After adjusting the Border, go to Border width and adjust it from 1 to 3 so that it will appear border.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 43

Then I add a little shadow.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 44 [Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 45 [Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 46

Next I will do it with pressed but instead of having to start over, I will copy and paste it.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 47

Then click on the arrow in pressed and choose make unique.

If you do not press make unique, when you edit Styles in Normal, Pressed will also be changed.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 48

I will adjust the bg color of pressed a little brighter so that users know that they have already pressed it.

My color: 34fc0b.

[Tạo 2D Platformer Game với Godot]  Part 19: Designing UI with Custom Styles 49

Next, you do the same with Hover.[Tạo 2D Platformer Game với Godot] Part 19: Designing UI with Custom Styles

I will have the final result.

summary

So I showed you how to design UI with Godot and in the next part I will show you how to create custom fonts.

The article achieved: 5/5 – (100 votes)

Tags: customdesigningGameGodotPartPlatformerStylestạovới
Previous Post

Chromiux – Tool to Get Stored Passwords and Cookies on Chrome

Next Post

How to use MobaXterm to Remote VPS Linux from Windows

AnonyViet

AnonyViet

Related Posts

Windows 7/8.1/10 users will be upgraded to Windows 11 for free
Tips

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

July 30, 2026
Instructions for receiving ChatGPT Plus for 1 month for free in 2026
Tips

Instructions for receiving ChatGPT Plus for 1 month for free in 2026

July 28, 2026
Some reasons I don’t like Windows 11
Tips

Some reasons I don’t like Windows 11

July 27, 2026
Instructions on how to get free Facebook white ticks
Tips

Instructions on how to get free Facebook white ticks

July 27, 2026
Collection of Windows 11 wallpapers for computers and phones
Tips

Collection of Windows 11 wallpapers for computers and phones

July 26, 2026
Don’t install leaked Windows 11
Tips

Don’t install leaked Windows 11

July 25, 2026
Next Post
How to use MobaXterm to Remote VPS Linux from Windows

How to use MobaXterm to Remote VPS Linux from Windows

0 0 votes
Article Rating
Subscribe
Login
Notify of
guest

guest

0 Comments
Oldest
Newest Most Voted

Recent News

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

July 30, 2026
Instructions for receiving the free Certified LLM Security Expert certificate

Instructions for receiving the free Certified LLM Security Expert certificate

July 30, 2026
MSI laptops are not just for gamers: Which line is suitable for students, office workers and creative people?

MSI laptops are not just for gamers: Which line is suitable for students, office workers and creative people?

July 29, 2026
What is quantum resistant cryptography? Why must the Internet change?

What is quantum resistant cryptography? Why must the Internet change?

July 29, 2026
Windows 7/8.1/10 users will be upgraded to Windows 11 for free

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

July 30, 2026
Instructions for receiving the free Certified LLM Security Expert certificate

Instructions for receiving the free Certified LLM Security Expert certificate

July 30, 2026
MSI laptops are not just for gamers: Which line is suitable for students, office workers and creative people?

MSI laptops are not just for gamers: Which line is suitable for students, office workers and creative people?

July 29, 2026
AnonyViet - English Version

AnonyViet

AnonyViet is a website share knowledge that you have never learned in school!

We are ready to welcome your comments, as well as your articles sent to AnonyViet.

Follow Us

Contact:

Email: anonyviet.com[@]gmail.com

Main Website: https://anonyviet.com

Recent News

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

Windows 7/8.1/10 users will be upgraded to Windows 11 for free

July 30, 2026
Instructions for receiving the free Certified LLM Security Expert certificate

Instructions for receiving the free Certified LLM Security Expert certificate

July 30, 2026
  • Home
  • Home 2
  • Home 3
  • Home 4
  • Home 5
  • Home 6
  • Next Dest Page
  • Sample Page

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

No Result
View All Result
  • Home
  • News
  • Software
  • Knowledge
  • MMO
  • Tips
  • Security
  • Network
  • Office

say88 tỷ lệ kèo nhà cái kèo nhà cái 5 febet

wpDiscuz
0
0
Would love your thoughts, please comment.x
()
x
| Reply