Davide Cortellucci gathered UI code from past projects into a set of reusable Godot components.
UI code written for one game often needs some cleanup before it can be used in another.
Davide Cortellucci had built UI scripts he used across projects over the years. He stripped out references to those projects, added demos and documentation, and released the collection as an
open-source addon for Godot.
Some components can be added to a scene and configured there. Others are base classes you extend for a particular menu or list.
StatefulButton, for example, tells you when a button is hovered, pressed, or disabled. It leaves the visuals to you. Node2DWrapper lets a Node2D scene work inside a Control layout. Davide uses both in a demo to make an animated button with a sprite.
ListDisplay is a base for lists whose contents change, such as an inventory. It can add, update, remove, and sort entries, but you extend it to decide how each item appears. The inventory demo uses it alongside TextureRepeater, which creates the repeated slots.
(The art in this inventory is just for the demo.)
ToggleableDisplay gives menus and dialogs shared input hooks and signals to request opening or closing. Davide extends it in the demo to make a pause menu and the confirmation dialog below.
You can run a demo for every component in the
GitHub project. The
Godot Asset Library download contains only the addon. It supports
Godot 4.5 or later and uses the
MIT license.
Find Davide's work here:
Want to learn Godot VFX and shaders?
We just released our new
Godot All About VFX Bundle, it covers shaders, particles, and VFX for 2D, UI, and 3D games with step-by-step examples. Over 600 pages of content. ✨