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

UnreliableCode Community

Developer Research, Reverse Engineering & Coding Community

Source

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

ThreadSafety
Concurrency Auditor
VIP
Rep: 376
Join Date: Oct 2023
Posts: 6
Thanks: 12
3y ago · Sep 25, 2022 10:00 AM
#1
Sharing a custom ImGui toggle switch widget that animates a sliding circle handle between ON and OFF states with easing.
ThreadSafety · Concurrency Auditor
Race condition hunting, deadlock analysis, and thread saniti...
The following users thanked ThreadSafety for this post:
CodeRefactorer
Software Architect
MEMBER
Rep: 296
Join Date: Feb 2021
Posts: 6
Thanks: 21
3y ago · Sep 25, 2022 12:36 PM
#2
Using an animation dictionary keyed by ImGui::GetID(label) to interpolate the slider position with ImLerp and deltaTime.
CodeRefactorer · Software Architect
Clean architecture, SOLID principles, and refactoring legacy...
DarkLogic
Game Logic & SDK Developer
MEMBER
Rep: 180
Join Date: Jun 2024
Posts: 28
Thanks: 41
3y ago · Sep 25, 2022 2:36 PM
#3
Looks so much better than standard square checkboxes in modern gaming UI menus!
DarkLogic | Virtual method tables & SDKs