[Dev Update #10] - UI 2.0 #24
SoloByte
announced in
Dev Updates
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I completely revamped the UI system in ShapeEngine to be more user-friendly and robust. Drawing inspiration from Godot's Control Node system, I created a similar node called ControlNode in ShapeEngine. However, I simplified it and modified it to better suit ShapeEngine's needs.
The UI system in ShapeEngine is based on the Rect struct for drawing and handling mouse events like enter and exit. Each control node has a rect that is dynamically updated based on its properties or its parent's properties.
ControlNodes in ShapeEngine follow a simple parent-child hierarchy, where one parent can have multiple children. This allows for easy control over how the children are drawn, which is particularly useful for containers.
Additionally, I introduced a ControlNodeNavigator that facilitates navigation between control nodes. It intelligently detects input from the keyboard, gamepad, and mouse to select the appropriate neighbor for navigation. This feature seamlessly works with containers, making UI navigation smooth and intuitive.
YouTube
Changelog
Beta Was this translation helpful? Give feedback.
All reactions