YAGADA
December 26, 2024, 7:40pm
1
Godot Version
4.3
Question
Let’s say I want to hover over an icon. I want it to expand, around 20 pixels maybe. This is, however, an HBoxContainer, and I am not sure how I can resize it when it’s hovered over!
It’s inside a ControlNode. If you have any questions please ask. Thanks!
Sweatix
December 26, 2024, 9:58pm
2
I answered a post similar to this one some months ago. Have a look at the post and ask any questions if there’s something that needs explaining.
A common way this is done in interactive UI that uses CSS (or similar) is to use an inner container – just a nested container. By “container” I don’t mean an actual Container node; just a Control node that contains content. For example:
Panel (root)
Panel (nested container)
…insert your design here
With this setup, you are free to adjust the styling of your card since the HBoxContainer is using the root of your card to control its size.
There’s a few extra settings you need to configur…
2 Likes
YAGADA
January 3, 2025, 11:43pm
3
Looking into it. Once I’m done researching I’ll analyse and see if I should mark this as a solution. Thanks for replying. See you in a few days!