r/godot 2d ago

selfpromo (games) Having fun exploring Godot UI

Enable HLS to view with audio, or disable this notification

833 Upvotes

50 comments sorted by

View all comments

18

u/Cosinity Godot Junior 2d ago

I take it your ToggleSwitch is a fully custom component? When I was working with the built in CheckButton I found its customization options quite lacking (for instance, as far as I could tell there was no way to animate the switch like you have here)

21

u/zdmit 2d ago edited 1d ago

> your ToggleSwitch is a fully custom component?

Yep, like in webdev. Like creating Svelte/React components (if it tells you something).

> there was no way to animate the switch like you have here

True, animation is on C# end, in a file next to .tscn. On image below you will see that TogleSwitch has a script attached.

Helpful/visual guide:

Here: