Wrapping in a panel
So far, we have created a button and styled it. However, it would be nice if it served some purpose, especially since we gave it a meaningful label. We’ll write some code so that this button can close a panel near the end of the Filling the panel with more control nodes section. Before we get to that point, though, we need the panel.
As we are introducing more UI nodes, let’s remember why we are doing this within the game’s context. Clara’s uncle had left a note. We’ll simulate that note with a combination of UI nodes in Godot so that it looks as follows:
Figure 11.3 – Clara’s note
We’ve already taken care of the button, but it is currently sitting in the middle of nowhere. We’ll wrap it in a Panel node in this section after we give a short disclaimer.
A Panel node is just another Control node in Godot that usually holds other components. There is a similarly named node...