implementing color wheel and new color picker

This commit is contained in:
2017-11-23 20:26:57 +00:00
parent d44434a458
commit a90aa4a60e
23 changed files with 371 additions and 26 deletions

View File

@@ -242,7 +242,7 @@ void App::update(float dt)
//glViewport(0, 0, (GLsizei)width, (GLsizei)height);
//glClear(GL_COLOR_BUFFER_BIT);
#ifdef _WIN32
#if _WIN32 || __OSX__
layout.reload();
#endif
if (auto* main = layout[main_id])
@@ -260,7 +260,7 @@ void App::update(float dt)
auto pix = ui::Canvas::I->m_current_brush.m_tip_color;
auto hsv = convert_rgb2hsv(glm::vec3(pix[0], pix[1], pix[2]));
color->m_hue->set_value(hsv.x);
color->m_quad->set_value(1.f - hsv.y, 1.f - hsv.z);
color->m_quad->set_value(hsv.y, 1.f - hsv.z);
auto observer = [this](Node* n)
{