This commit is contained in:
Branimir Karadžić 2014-06-28 11:54:30 -07:00
parent 167a6717c5
commit 167ec3e1bc

View file

@ -1558,7 +1558,7 @@ struct Imgui
} }
} }
void colorWheelWidget(float _color[3], bool _respectIndentation, bool _enabled) void colorWheelWidget(float _rgb[3], bool _respectIndentation, bool _enabled)
{ {
m_widgetId++; m_widgetId++;
const uint32_t wheelId = (m_areaId << 16) | m_widgetId; const uint32_t wheelId = (m_areaId << 16) | m_widgetId;
@ -1593,7 +1593,7 @@ struct Imgui
float sel[2]; float sel[2];
float hsv[3]; float hsv[3];
rgbToHsv(hsv, _color); rgbToHsv(hsv, _rgb);
if (_enabled) if (_enabled)
{ {
@ -1690,7 +1690,7 @@ struct Imgui
const float sat = bx::fclamp(uu/val, 0.0001f, 1.0f); const float sat = bx::fclamp(uu/val, 0.0001f, 1.0f);
const float out[3] = { hsv[0], sat, val }; const float out[3] = { hsv[0], sat, val };
hsvToRgb(_color, out); hsvToRgb(_rgb, out);
// Draw widget. // Draw widget.
nvgSave(m_nvg); nvgSave(m_nvg);