Тёмный

Introduction to UI Containers in Godot 3 (tutorial) 

GDQuest
Подписаться 261 тыс.
Просмотров 99 тыс.
50% 1

Learn how the most important containers work in Godot 3!
Intermediate Godot 3 course: gdquest.mavenseed.com/courses
Beginner Godot 3 course on Udemy: bit.ly/guis-godot-course
LINKS
Download the demo Godot project: bit.ly/intro-to-containers-god...
More on containers in the official docs: bit.ly/godot-docs-ui-workflows
This video is supported by:
- Gamblify: www.gamblify.com/
- Pineapple Works: pineapple.works/
- Echo86: www.echo86.com/
Subscribe for more tutorials! ru-vid.com?sub_con...
Twitter ► / nathangdquest
Instagram ► / nathan_gdquest
This video is licensed under the CC-By 4.0 license: creativecommons.org/licenses/...
You can attribute it to "GDQuest and contributors - www.gdquest.com/"

Опубликовано:

 

23 май 2018

Поделиться:

Ссылка:

Скачать:

Готовим ссылку...

Добавить в:

Мой плейлист
Посмотреть позже
Комментарии : 48   
@Gdquest
@Gdquest 6 лет назад
For more info on containers and the core UI workflow, head to this page I wrote for the official documentation: bit.ly/godot-docs-ui-workflows And if you have any more questions about containers and UI system in Godot we'll be glad to help you :)
@TitlePending
@TitlePending 6 лет назад
Thanks this is really helpful. However, since this now becoming like a network channel. Please say "Hi, my name is _____________ for GDquest or something to that effect." I'm sorry I forgot because I know Nathan, and I see the icon and think Nathan, but the voice and person is different, and I'd like to know who you are as well.
@GuilhermeOliveira-fe2vc
@GuilhermeOliveira-fe2vc 6 лет назад
I'll keep that in mind for the next time, thanks :) No worries about forgetting, my name is pretty weird aswell and this is only the second video.
@mattiasmyhrman7412
@mattiasmyhrman7412 6 лет назад
Great content as always! What is the proper way to do animations within Godots UI system? I searched and found nothing of relevance. Two examples of this would be moving UI elements in transitions and re-positioning list items smoothly when items are added/removed
@Gdquest
@Gdquest 6 лет назад
In general you can use the animation system to animate the position of UI elements and emit a signal when the animation's done (or use the tween node), and a state machine to lock your UI while it's playing animations. You should only be careful with the Size Flags property: a UI element set to expand may give you unexpected results in some situations but that's about it. If you use built-in containers however they take control of their children so you can't get smooth list reordering out of the box. For custom complex behavior you'll have to use the base Container class and its "sort children" signal. Or you can use the trick below. You can animate UI elements that are in a container to some extent: in the case of the list, you can deactivate the container temporarily, play the animation, then in a second step swap the node order in the tree, reactivate the container and snap the control nodes back to their start position. It's similar to how you handle grid-based movement where you move the objects' colliders and their sprites in different ways. Or you can add a control node between the container and the UI component it controls so that you can animate the UI component independently from its parent. You'll have to make some tests and see what works best for your project! It depends a lot on your UI.
@mattiasmyhrman7412
@mattiasmyhrman7412 6 лет назад
Thank you for your reply. Yes that was basically my plan. I am a little bit surprised at this since all other areas seems to be very mature for 2d with built in solutions for all common use cases except UI animations.
@MrSmith_
@MrSmith_ 4 года назад
Thank you for such a clear explanation, it reminds me of responsive layouts in webdev.
@thedamino87
@thedamino87 3 года назад
This was incredible! Thanks for your videos man! You've been such an amazing resource for learning Godot!
@Liam-pf7ih
@Liam-pf7ih 6 лет назад
is the GD in your name "game design" or "Godot"
@Gdquest
@Gdquest 6 лет назад
game design quest. More info here: gdquest.com/about/
@syedrizvi6408
@syedrizvi6408 4 года назад
very nicely explained Very helpful to understand containers and Godot.
@SufianDira
@SufianDira 2 года назад
Good video. Thanks.
@hodorba5567
@hodorba5567 3 года назад
omg this removes 25% of my development time lmao, fk rearranging everything perfectly all the time -.-
@sosasees
@sosasees 4 года назад
I'd like to see a tutorial on TouchScreenButton's, because I need help with setting up TouchScreenButton's for doing actions from the Input Map. Also, I need help setting up the triangular shape for a TouchScreenButton that must be triangular.
@mcKrawll
@mcKrawll 4 года назад
How do you anchor something as a full rect?
@jvstAsYouAre
@jvstAsYouAre 4 года назад
How did you get your images to be the right size?
@rocket007
@rocket007 Год назад
Old but gold
@fragarena9910
@fragarena9910 6 лет назад
Whoa nice discount on the udemy link 👍 thanks
@Gdquest
@Gdquest 6 лет назад
Thank Guilherme! There are often big discounts on Udemy, but this link guarantees the lowest you can get on his course I think.
@dougkarpp7343
@dougkarpp7343 5 лет назад
Great video! I’m hoping you can answer a question for me that I can’t find in the documentation or get to work through my experimenting. In the video you hide the “Attack” nodes and the “Defense” node moves up to the top to be under “Select Character”. Is there a way to have these align to the bottom of the container node instead of the top? I’ve tried different anchors, but it doesn’t seem to respond. Thanks for your help.
@user-qm3dt8tb5s
@user-qm3dt8tb5s 5 лет назад
There is a way to do what you want. 1. Select VBox (which holds "Select Char" and Attack and Defense nodes). 2. Go to its props and find Alignment (should be the top most). 3. Set it to value to End. Now we have a little problem: "Select Char" label is pushed down too. To fix this 1. Select that label. 2. Find Vertical property under "Size Flags" section. 3. Set it to Expand and uncheck Fill. Now you have label on top of VBox and other things at the bottom. Tested in Godot 3.0.6.
@rahulc4281
@rahulc4281 4 года назад
I cant set them as full rect. When i click layout and click full rect it says in console set anchor and margin. I don't understand what to do....
@cholasimmons
@cholasimmons 4 года назад
could you explain how I can "hook up" a speedometer in the GUI to a rev counter in my vehicle script? I'm guessing signals wouldn't be the way to go?
@flaviokonti5522
@flaviokonti5522 4 года назад
why not signal? use setget on rev counter, and inside the setter function emmit a signal that will update the UI gauge everytime your data rev counter data changes
@Rendat666
@Rendat666 4 года назад
"Containers take the wheel"
@diegohiroshiysusvideos2909
@diegohiroshiysusvideos2909 4 года назад
I can do this in my Slot Machine Game?. Regards.
@mbcline
@mbcline 3 года назад
I'm struggling with trying to replicate the simple button layout that you are demonstrating around the 1-minute mark of this video. When I create the same structure, my buttons initialize as very small, and don't fill up the space of the parent container. I can mess with the margins of them to make them fill the parent containers, but at that point I'm doing it all manually. I can't figure out how to get the HBOXContainer and VBoxContainer to control their children and lay them out in a nice space-filling way like you demonstrate here. I tried downloading the samples, but unfortunately this box example was not present there.
@quarrlk
@quarrlk Год назад
Don't know if you have figured it out yet :p but here is the solution: Inspector (of your item node in a container) -> Filter properties (search for "size flags") -> horizontal -> tick the "expand" box
@jminrobinson3537
@jminrobinson3537 Год назад
@@quarrlk Very helpful for other users. Thank you!
@KjKase
@KjKase 5 лет назад
Is there a way to make the margins of a margin container be automatic/fluid? like say, 10% of the overall height/width? I've tried putting in values other than integers in to the margin values in the inspector to achieve this, but it doesn't work. I'm guessing you probably have to make a script yourself for this functionality then?
@Gdquest
@Gdquest 5 лет назад
Yes you'll need a script
@heckyes
@heckyes 3 года назад
Glorious. It's like HTML layouts form the 90s!
@mokafi7
@mokafi7 3 года назад
did you also notice the "lorem ipsum"?
@AnirudhIsOnline
@AnirudhIsOnline 4 года назад
Good tutorial. But if I want space in between child nodes of a container , how do I do it ??
@theselfishmeme_23
@theselfishmeme_23 4 года назад
Use Custom constants -> Separation
@AnirudhIsOnline
@AnirudhIsOnline 4 года назад
@@theselfishmeme_23 Thanks 😁
@haroldgarrett2932
@haroldgarrett2932 Год назад
i have spent over 8 hours at this point just trying to get a single logo and button aligned on the screen. margins reset randomly or don't work, boxes are either wildly out of bounds of the margins or have no width at all, and there is zero documentation on the website or in godot itself that explains what any of the features mean outside of a one-sentence description. every tutorial i look up does it completely differently with the nodes being used
@kristopherhokanson3796
@kristopherhokanson3796 4 года назад
PLEASE go over commonly seen issues in these videos. There is absolutely no troubleshooting seen here.
@oito20
@oito20 6 лет назад
Muito sotaque, aaaaah. Parece eu falando inglês. Hue.
@generic........
@generic........ 3 года назад
"Rearrange-jed"... Ya, it's supposed to be 3 syllables
@wyydescreen
@wyydescreen 3 года назад
actually its not themes to change panel background its custom styles, good vid otherwise tho
@jorge28624
@jorge28624 6 лет назад
Identity theft is not a joke, Jim! Millions of families suffer every year!
@user-eh8ug9gw1x
@user-eh8ug9gw1x Год назад
bad sound quality :/
@eric-jt4ij
@eric-jt4ij 3 года назад
Didnt explain anything.
@vokhshed1886
@vokhshed1886 3 года назад
This is not a tutorial.
@ic6406
@ic6406 2 года назад
Very superficial tutorial
Далее
вернуть Врискаса 📗 | WICSUR #shorts
00:54
I'm Excited To see If Kelly Can Meet This Challenge!
00:16
Getting Started with Screen Sizes in Godot 3
7:08
Просмотров 90 тыс.
Godot Shader Tutorial (1): Intro to Shader Programming
23:09
6 Tips to Better Organize your Godot Projects
11:39
Просмотров 133 тыс.
BETTER 2D visuals in 7 EASY TIPS
10:38
Просмотров 64 тыс.
Godot Recipes: Animation States
10:31
Просмотров 105 тыс.
Custom Resources in Godot 4 and How to use them
9:36
How to add UI sounds in Godot 4 the smart way
33:59
Просмотров 8 тыс.
вернуть Врискаса 📗 | WICSUR #shorts
00:54