-
Notifications
You must be signed in to change notification settings - Fork 0
Toggles.md
cfloutier edited this page Apr 29, 2024
·
4 revisions
I use 2 kind of toggle in K2D2


An animated Slide Toggle, i've made sollowing this tuto : https://docs.unity3d.com/Manual/UIE-slide-toggle.html
it can be used like any standard Toggle.
it can be boudn with a Setting<bool>
see Settings
ex :
panel.Q<K2Toggle>("bool_settings").Bind(settings.bool_item);Toggle buton are square button that can be lit on/off

the default "on" color is green but you can change it to yellow using the uss class : .yellow
icon mode can be used by
- adding the icon as a child VisualElement named
#icon
- adds an icon style class
.iconto the ToggleButton - adds either the style, depending on the button size
-
.big
-
.mini-toggle
-