summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2016-09-10 12:21:02 -0300
committerGitHub <noreply@github.com>2016-09-10 12:21:02 -0300
commitfc61eb37ce004ecfa0656a46c68d111c68bb5c19 (patch)
tree0aa31fc3891596abca39042f27404f329e002b2d /scene/gui
parent026c7913cf6f38b948d66484d97d7841fa1c9f16 (diff)
parenta4674bda47ddeed7cc929bafdcd89b6bd156ee30 (diff)
Merge pull request #5920 from 29jm/fix-warnings
Fix some more warnings
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/color_picker.cpp17
1 files changed, 9 insertions, 8 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index b69646432e..5e66544153 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -41,13 +41,13 @@ void update_material(Ref<CanvasItemMaterial>mat,const Color& p_color,float h,flo
if (!sdr.is_valid())
return;
- mat->set_shader_param("R",p_color.r);
- mat->set_shader_param("G",p_color.g);
- mat->set_shader_param("B",p_color.b);
- mat->set_shader_param("H",h);
- mat->set_shader_param("S",s);
- mat->set_shader_param("V",v);
- mat->set_shader_param("A",p_color.a);
+ mat->set_shader_param("R",p_color.r);
+ mat->set_shader_param("G",p_color.g);
+ mat->set_shader_param("B",p_color.b);
+ mat->set_shader_param("H",h);
+ mat->set_shader_param("S",s);
+ mat->set_shader_param("V",v);
+ mat->set_shader_param("A",p_color.a);
}
void ColorPicker::_notification(int p_what) {
@@ -397,9 +397,10 @@ void ColorPicker::_screen_input(const InputEvent &ev)
if (!r->get_rect().has_point(Point2(mev.global_x,mev.global_y)))
return;
Image img =r->get_screen_capture();
- if (!img.empty())
+ if (!img.empty()) {
last_capture=img;
r->queue_screen_capture();
+ }
if (!last_capture.empty())
set_color(last_capture.get_pixel(mev.global_x,mev.global_y));
}