Home / Forums / Creating Smooth Animated Toggle Switches in Dear ImGui [Discussion #8]

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Source

Creating Smooth Animated Toggle Switches in Dear ImGui [Discussion #8]

ImGuiAddict
GUI Developer
MEMBER
Rep: 261
Join Date: Sep 2022
Posts: 6
Thanks: 73
3y ago · Sep 7, 2022 4:36 PM
#1
Sharing a custom ImGui toggle switch widget that animates a sliding circle handle between ON and OFF states with easing.
ImGuiAddict · GUI Developer
Building debug consoles, inspector panels, and telemetry das...
The following users thanked ImGuiAddict for this post:
ConsoleKing
Terminal & CLI Tools
MEMBER
Rep: 195
Join Date: Jan 2020
Posts: 6
Thanks: 59
3y ago · Sep 7, 2022 7:54 PM
#2
Using an animation dictionary keyed by ImGui::GetID(label) to interpolate the slider position with ImLerp and deltaTime.
ConsoleKing · Terminal & CLI Tools
Building sleek command-line tools with Spectre.Console and A...
ShadowPwn
Security Researcher
MEMBER
Rep: 150
Join Date: Feb 2024
Posts: 19
Thanks: 35
3y ago · Sep 7, 2022 8:54 PM
#3
Looks so much better than standard square checkboxes in modern gaming UI menus!
ShadowPwn · Security & Anticheat Analysis