summaryrefslogtreecommitdiff
path: root/scene
diff options
context:
space:
mode:
authorRĂ©mi Verschelde <rverschelde@gmail.com>2016-11-28 15:32:06 +0100
committerGitHub <noreply@github.com>2016-11-28 15:32:06 +0100
commitbb1201af1f3b846a69e06c5317b195dafdd0452c (patch)
tree648885a53e732d81d049dcb942d0cde5a3926ce2 /scene
parente297087caba99606ff382ee731a75e8f2347f894 (diff)
parentd9048309e4df65d4b4d0bf87265ce67a2234389c (diff)
Merge pull request #7198 from volzhs/fix-color-picker
Fix color selected with mouse scroll
Diffstat (limited to 'scene')
-rw-r--r--scene/gui/color_picker.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/gui/color_picker.cpp b/scene/gui/color_picker.cpp
index d6535ef511..5ced54b825 100644
--- a/scene/gui/color_picker.cpp
+++ b/scene/gui/color_picker.cpp
@@ -296,7 +296,7 @@ void ColorPicker::_hsv_draw(int p_wich,Control* c)
void ColorPicker::_uv_input(const InputEvent &ev) {
if (ev.type == InputEvent::MOUSE_BUTTON) {
const InputEventMouseButton &bev = ev.mouse_button;
- if (bev.pressed) {
+ if (bev.pressed && bev.button_index==BUTTON_LEFT) {
changing_color = true;
float x = CLAMP((float)bev.x,0,256);
float y = CLAMP((float)bev.y,0,256);
@@ -329,7 +329,7 @@ void ColorPicker::_uv_input(const InputEvent &ev) {
void ColorPicker::_w_input(const InputEvent &ev) {
if (ev.type == InputEvent::MOUSE_BUTTON) {
const InputEventMouseButton &bev = ev.mouse_button;
- if (bev.pressed) {
+ if (bev.pressed && bev.button_index==BUTTON_LEFT) {
changing_color = true;
h=1-((float)bev.y)/256.0;