diff options
author | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-02-05 17:35:39 +0100 |
---|---|---|
committer | Markus Sauermann <6299227+Sauermann@users.noreply.github.com> | 2023-02-09 01:00:54 +0100 |
commit | 888add8418facd417b37244d00b727a2cf5bf5e0 (patch) | |
tree | 87549abf761ec3e35416e8831c20ff7f45f79a07 /scene/main/viewport.cpp | |
parent | 2572f6800aef09bd6ea96f3b1c7a999a962eecb7 (diff) |
Fix Color Picking
With the 4.x-introduction of Windows the previous method for
color picking was no longer working.
This PR uses the following approach to reintroduce color-picking.
When the Color-Picking-Button is pressed, a quasi-screenshot of the
Window-content is created and displayed in a new Popup-Window.
This new Window allows selecting colors by Mouse-Click.
A Preview of the targeted Color is also displayed.
Diffstat (limited to 'scene/main/viewport.cpp')
-rw-r--r-- | scene/main/viewport.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/scene/main/viewport.cpp b/scene/main/viewport.cpp index a1e7555a5d..5f969c98a2 100644 --- a/scene/main/viewport.cpp +++ b/scene/main/viewport.cpp @@ -1311,7 +1311,7 @@ void Viewport::_gui_show_tooltip() { Window *window = gui.tooltip_popup->get_parent_visible_window(); Rect2i vr; if (gui.tooltip_popup->is_embedded()) { - vr = gui.tooltip_popup->_get_embedder()->get_visible_rect(); + vr = gui.tooltip_popup->get_embedder()->get_visible_rect(); } else { vr = window->get_usable_parent_rect(); } @@ -1832,7 +1832,7 @@ void Viewport::_gui_input_event(Ref<InputEvent> p_event) { Window *w = Object::cast_to<Window>(this); if (w) { if (w->is_embedded()) { - embedder = w->_get_embedder(); + embedder = w->get_embedder(); viewport_pos = get_final_transform().xform(mpos) + w->get_position(); // To parent coords. } |