ImGuizmo icon indicating copy to clipboard operation
ImGuizmo copied to clipboard

Style

Open bootzin opened this issue 4 years ago • 3 comments

I was wondering if it would be possible to add some style options to imguizmo, allowing us to change gizmo colors, and maybe gizmo sizes?

bootzin avatar Dec 04 '20 21:12 bootzin

I don't see anything that would block. With 1 function just like ImGui: ImGuizmo::SetStyle(CONSTANT, value); and a bunch of constants.

CedricGuillemet avatar Dec 05 '20 09:12 CedricGuillemet

That is interesting.. Would you be willing to work on this, or would you rather I submitted a PR? If the latter, I'd like that you pointed out to me the places where these values are used, since, from a quick look, colors and sizes seem to always be hardcoded

bootzin avatar Dec 05 '20 15:12 bootzin

There are some sizes here : https://github.com/CedricGuillemet/ImGuizmo/blob/502cce0b33dae11fe9fa4aa22d8371f0d53fd161/ImGuizmo.cpp#L43

and colors here: https://github.com/CedricGuillemet/ImGuizmo/blob/502cce0b33dae11fe9fa4aa22d8371f0d53fd161/ImGuizmo.cpp#L687 https://github.com/CedricGuillemet/ImGuizmo/blob/502cce0b33dae11fe9fa4aa22d8371f0d53fd161/ImGuizmo.cpp#L690

quad sizes here: https://github.com/CedricGuillemet/ImGuizmo/blob/502cce0b33dae11fe9fa4aa22d8371f0d53fd161/ImGuizmo.cpp#L700

Some other colors are hardcoded but it's easy to find them by searching the term color https://github.com/CedricGuillemet/ImGuizmo/blob/502cce0b33dae11fe9fa4aa22d8371f0d53fd161/ImGuizmo.cpp#L1480

CedricGuillemet avatar Dec 06 '20 14:12 CedricGuillemet