Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Added widget for 6 colours.

  • Loading branch information...
commit d7b636862976d0a23200652777939a9a8f324d7a 1 parent d376153
@acaudwell authored
Showing with 15 additions and 0 deletions.
  1. +14 −0 ui/colour.cpp
  2. +1 −0  ui/colour.h
View
14 ui/colour.cpp
@@ -155,6 +155,20 @@ UILabelColour::UILabelColour(const std::string& label, vec3* a, vec3* b, vec3* c
padding = vec2(5.0f);
}
+UILabelColour::UILabelColour(const std::string& label, vec3* a, vec3* b, vec3* c, vec3* d, vec3* e, vec3* f) : UILayout(true) {
+
+ ui_colour = 0;
+
+ addElement(new UILabel(label, false, 120.0f));
+ addElement(new UIColour(a));
+ addElement(new UIColour(b));
+ addElement(new UIColour(c));
+ addElement(new UIColour(d));
+ addElement(new UIColour(e));
+ addElement(new UIColour(f));
+ padding = vec2(5.0f);
+}
+
void UILabelColour::setColour(vec3* value) {
if(ui_colour) {
ui_colour->setColour(value);
View
1  ui/colour.h
@@ -40,6 +40,7 @@ class UILabelColour : public UILayout {
UILabelColour(const std::string& label);
UILabelColour(const std::string& label, vec3* value);
UILabelColour(const std::string& label, vec3* a, vec3* b, vec3* c);
+ UILabelColour(const std::string& label, vec3* a, vec3* b, vec3* c, vec3* d, vec3* e, vec3* f);
void setColour(vec3* value);
Please sign in to comment.
Something went wrong with that request. Please try again.