From 52afe0f43345c886348501329f4908a40c2dfd33 Mon Sep 17 00:00:00 2001 From: Dario Manesku Date: Wed, 6 Aug 2014 07:51:16 +0100 Subject: [PATCH] Using imguiCollapse instead of imguiButton for imguiColorWheel. --- examples/common/imgui/imgui.cpp | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/examples/common/imgui/imgui.cpp b/examples/common/imgui/imgui.cpp index c965aba79..ac7cf986d 100644 --- a/examples/common/imgui/imgui.cpp +++ b/examples/common/imgui/imgui.cpp @@ -2298,14 +2298,13 @@ void imguiColorWheel(float _rgb[3], bool _respectIndentation, bool _enabled) void imguiColorWheel(const char* _text, float _rgb[3], bool& _activated, bool _enabled) { char buf[128]; - bx::snprintf(buf, sizeof(buf), "%s [RGB %-2.2f %-2.2f %-2.2f]" - , _text + bx::snprintf(buf, sizeof(buf), "[RGB %-2.2f %-2.2f %-2.2f]" , _rgb[0] , _rgb[1] , _rgb[2] ); - if (imguiButton(buf, true) ) + if (imguiCollapse(_text, buf, _activated, _enabled) ) { _activated = !_activated; }