- Godot Engine Game Development Projects
- Chris Bradfield
- 257字
- 2021-06-18 18:51:30
Containers
UI containers automatically arrange the positions of their child Control nodes (including other Containers). You can use them to add padding around elements, center them, or arrange elements in rows or columns. Each type of Container has special properties that control how they arrange their children. You can see these properties in the Custom Constants section of the Inspector.
Remember that containers automatically arrange their children. If you move or resize a Control that's inside a Container node, you'll find it snaps back to its original position. You can manually arrange controls or arrange them with a container, but not both.
To manage the score and time labels, add a MarginContainer node to the HUD. Use the Layout menu to set the anchors to Top Wide. In the Custom Constants section, set Margin Right, Margin Top, and Margin Left to 10. This will add some padding so that the text isn't against the edge of the screen.
Since the score and time labels will use the same font settings as the MessageLabel, it will save time if you duplicate it. Click on MessageLabel and press Ctrl + D (Cmd + D on macOS) twice to create two duplicate labels. Drag them both and drop them on the MarginContainer to make them its children. Name one ScoreLabel and the other TimeLabel and set the Text property to 0 for both. Set Align to Left for ScoreLabel and Right for TimeLabel.
- LabVIEW虛擬儀器從入門(mén)到測(cè)控應(yīng)用130例
- 工業(yè)機(jī)器人產(chǎn)品應(yīng)用實(shí)戰(zhàn)
- Julia 1.0 Programming
- 空間傳感器網(wǎng)絡(luò)復(fù)雜區(qū)域智能監(jiān)測(cè)技術(shù)
- Mastering Elastic Stack
- 大數(shù)據(jù)平臺(tái)異常檢測(cè)分析系統(tǒng)的若干關(guān)鍵技術(shù)研究
- PyTorch Deep Learning Hands-On
- 網(wǎng)絡(luò)安全與防護(hù)
- 基于ARM9的小型機(jī)器人制作
- 人工智能:智能人機(jī)交互
- 簡(jiǎn)明學(xué)中文版Flash動(dòng)畫(huà)制作
- 中國(guó)戰(zhàn)略性新興產(chǎn)業(yè)研究與發(fā)展·數(shù)控系統(tǒng)
- Serverless Design Patterns and Best Practices
- WPF專(zhuān)業(yè)編程指南
- 實(shí)戰(zhàn)突擊