summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarianoGNU <marianognu.easyrpg@gmail.com>2016-02-06 00:26:54 -0300
committerMarianoGNU <marianognu.easyrpg@gmail.com>2016-02-06 00:26:54 -0300
commit11b3b68c3fd66c579e0d5be51f350b328507cb9f (patch)
treefe5c73b68dbe72c5aa64ee29671c4c3a39a47df4
parent614cf481ced4d8c96c461b07ea55764b492b33d2 (diff)
Stop ColorPicker's narcissism ( fixes #3592 )
Also prevent alpha in guidelines.
-rw-r--r--scene/gui/color_picker.cpp6
-rw-r--r--scene/gui/color_picker.h2
2 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index 7252860509..f1b910d23f 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -270,8 +270,10 @@ void ColorPicker::_hsv_draw(int p_wich,Control* c)
if (p_wich==0) {
int x=c->get_size().x*s;
int y=c->get_size().y-c->get_size().y*v;
- c->draw_line(Point2(x,0),Point2(x,c->get_size().y),color.inverted());
- c->draw_line(Point2(0,y),Point2(c->get_size().x,y),color.inverted());
+ Color col = color;
+ col.a=1;
+ c->draw_line(Point2(x,0),Point2(x,c->get_size().y),col.inverted());
+ c->draw_line(Point2(0,y),Point2(c->get_size().x,y),col.inverted());
c->draw_line(Point2(x,y),Point2(x,y),Color(1,1,1),2);
} else if (p_wich==1) {
int y=c->get_size().y-c->get_size().y*h;
diff --git a/scene/gui/color_picker.h b/scene/gui/color_picker.h
index 07c6d421df..4559bc7391 100644
--- a/scene/gui/color_picker.h
+++ b/scene/gui/color_picker.h
@@ -91,8 +91,6 @@ private:
void _add_preset_pressed();
void _screen_pick_pressed();
-friend class ColorPicker;
-
protected:
void _notification(int);