Search icon CANCEL
Subscription
0
Cart icon
Your Cart (0 item)
Close icon
You have no products in your basket yet
Save more on your purchases now! discount-offer-chevron-icon
Savings automatically calculated. No voucher code required.
Arrow left icon
Explore Products
Best Sellers
New Releases
Books
Videos
Audiobooks
Learning Hub
Conferences
Free Learning
Arrow right icon
Arrow up icon
GO TO TOP
Game Development with Blender and Godot

You're reading from   Game Development with Blender and Godot Leverage the combined power of Blender and Godot for building a point-and-click adventure game

Arrow left icon
Product type Paperback
Published in Sep 2022
Publisher Packt
ISBN-13 9781801816021
Length 330 pages
Edition 1st Edition
Languages
Tools
Arrow right icon
Author (1):
Arrow left icon
Kumsal Obuz Kumsal Obuz
Author Profile Icon Kumsal Obuz
Kumsal Obuz
Arrow right icon
View More author details
Toc

Table of Contents (20) Chapters Close

Preface 1. Part 1: 3D Assets with Blender
2. Chapter 1: Creating Low-Poly Models FREE CHAPTER 3. Chapter 2: Building Materials and Shaders 4. Chapter 3: Adding and Creating Textures 5. Chapter 4: Adjusting Cameras and Lights 6. Chapter 5: Setting Up Animation and Rigging 7. Part 2: Asset Management
8. Chapter 6: Exporting Blender Assets 9. Chapter 7: Importing Blender Assets into Godot 10. Chapter 8: Adding Sound Assets 11. Part 3: Clara’s Fortune – An Adventure Game
12. Chapter 9: Designing the Level 13. Chapter 10: Making Things Look Better with Lights and Shadows 14. Chapter 11: Creating the User Interface 15. Chapter 12: Interacting with the World through Camera and Character Controllers 16. Chapter 13: Finishing with Sound and Animation 17. Chapter 14: Conclusion 18. Index 19. Other Books You May Enjoy

Creating a simple button

A UI is a collection of components you lay out in a coherent manner around the core visuals of your game. The most essential UI component to start with may have been a Label node if we wanted it to be similar to printing “Hello, world!” when we are learning a new programming language. However, we’ll start with a Button node since the former case is so trivial, and we can also learn how to style a Button during this effort.

Before we start throwing around a bunch of UI nodes willy-nilly, we should first mention the right kind of structure to hold our UI nodes. We can use CanvasLayer similar to using a Spatial node to nest other nodes such as MeshInstance, AnimationPlayer, and others.

We’ve already been creating scenes mainly to display 3D models. Let’s follow similar steps for the sake of creating the UI:

  1. Create a blank scene and save it as UI.tscn in the Scenes folder.
  2. Choose CanvasLayer for its root node...
lock icon The rest of the chapter is locked
Register for a free Packt account to unlock a world of extra content!
A free Packt account unlocks extra newsletters, articles, discounted offers, and much more. Start advancing your knowledge today.
Unlock this book and the full library FREE for 7 days
Get unlimited access to 7000+ expert-authored eBooks and videos courses covering every tech area you can think of
Renews at €18.99/month. Cancel anytime