aboutsummaryrefslogtreecommitdiff
path: root/scene/gui/control.cpp
diff options
context:
space:
mode:
authorJuan Linietsky2015-01-03 00:23:14 -0300
committerJuan Linietsky2015-01-03 00:23:14 -0300
commit0df45672e7d985268de3040c24b86b4ac075a1d8 (patch)
tree1f1e5e3a9414dfff6ebf3854f6f057d3cc4d3e1b /scene/gui/control.cpp
parentd722537154cd87dca134e7055aa2bfdc187eb1b0 (diff)
downloadgodot-0df45672e7d985268de3040c24b86b4ac075a1d8.tar.gz
godot-0df45672e7d985268de3040c24b86b4ac075a1d8.tar.zst
godot-0df45672e7d985268de3040c24b86b4ac075a1d8.zip
-ability to scale and modulate texturebutton, closes #818
-fixed bug in ordering of modal subwindows, closes #1001
Diffstat (limited to 'scene/gui/control.cpp')
-rw-r--r--scene/gui/control.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index 5a0706f01..91d6a162f 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -768,6 +768,12 @@ Control* Control::_find_control_at_pos(CanvasItem* p_node,const Point2& p_global
c->_window_sort_subwindows(); // sort them
+ int idx=0;
+ for (List<Control*>::Element *E=c->window->subwindows.front();E;E=E->next()) {
+
+ if (!E->get()->is_visible())
+ continue;
+ }
for (List<Control*>::Element *E=c->window->subwindows.back();E;E=E->prev()) {
Control *sw = E->get();
@@ -1126,6 +1132,7 @@ void Control::_window_input_event(InputEvent p_event) {
over = _find_control_at_pos(this,pos,parent_xform,window->focus_inv_xform);
}
+
if (window->drag_data.get_type()==Variant::NIL && over && !window->modal_stack.empty()) {
Control *top = window->modal_stack.back()->get();
@@ -2267,6 +2274,7 @@ void Control::_window_sort_subwindows() {
return;
window->modal_stack.sort_custom<CComparator>();
+ window->subwindows.sort_custom<CComparator>();
window->subwindow_order_dirty=false;
}