Fix indentation issues in last commits
Ping @reduz.
(cherry picked from commit 0729c852b4
)
This commit is contained in:
parent
cb94271e9f
commit
9791d2ef6d
|
@ -460,9 +460,9 @@ void CanvasItem::_enter_canvas() {
|
||||||
|
|
||||||
while(n) {
|
while(n) {
|
||||||
|
|
||||||
canvas_layer = n->cast_to<CanvasLayer>();
|
canvas_layer = n->cast_to<CanvasLayer>();
|
||||||
if (canvas_layer) {
|
if (canvas_layer) {
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
n=n->get_parent();
|
n=n->get_parent();
|
||||||
}
|
}
|
||||||
|
@ -471,7 +471,7 @@ void CanvasItem::_enter_canvas() {
|
||||||
if (canvas_layer)
|
if (canvas_layer)
|
||||||
canvas=canvas_layer->get_world_2d()->get_canvas();
|
canvas=canvas_layer->get_world_2d()->get_canvas();
|
||||||
else
|
else
|
||||||
canvas=get_viewport()->find_world_2d()->get_canvas();
|
canvas=get_viewport()->find_world_2d()->get_canvas();
|
||||||
|
|
||||||
VisualServer::get_singleton()->canvas_item_set_parent(canvas_item,canvas);
|
VisualServer::get_singleton()->canvas_item_set_parent(canvas_item,canvas);
|
||||||
|
|
||||||
|
@ -482,9 +482,8 @@ void CanvasItem::_enter_canvas() {
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
|
|
||||||
|
|
||||||
CanvasItem *parent = get_parent_item();
|
CanvasItem *parent = get_parent_item();
|
||||||
canvas_layer=parent->canvas_layer;
|
canvas_layer=parent->canvas_layer;
|
||||||
VisualServer::get_singleton()->canvas_item_set_parent(canvas_item,parent->get_canvas_item());
|
VisualServer::get_singleton()->canvas_item_set_parent(canvas_item,parent->get_canvas_item());
|
||||||
parent->_queue_sort_children();
|
parent->_queue_sort_children();
|
||||||
}
|
}
|
||||||
|
@ -1173,7 +1172,7 @@ Matrix32 CanvasItem::get_viewport_transform() const {
|
||||||
return canvas_layer->get_transform();
|
return canvas_layer->get_transform();
|
||||||
}
|
}
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
return get_viewport()->get_final_transform() * get_viewport()->get_canvas_transform();
|
return get_viewport()->get_final_transform() * get_viewport()->get_canvas_transform();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -1481,30 +1481,29 @@ void Viewport::_gui_call_input(Control *p_control,const InputEvent& p_input) {
|
||||||
|
|
||||||
// _block();
|
// _block();
|
||||||
|
|
||||||
CanvasItem *ci=p_control;
|
CanvasItem *ci=p_control;
|
||||||
while(ci) {
|
while(ci) {
|
||||||
|
|
||||||
Control *control = ci->cast_to<Control>();
|
Control *control = ci->cast_to<Control>();
|
||||||
if (control) {
|
if (control) {
|
||||||
control->call_multilevel(SceneStringNames::get_singleton()->_input_event,p_input);
|
control->call_multilevel(SceneStringNames::get_singleton()->_input_event,p_input);
|
||||||
if (gui.key_event_accepted)
|
if (gui.key_event_accepted)
|
||||||
break;
|
break;
|
||||||
if (!control->is_inside_tree())
|
if (!control->is_inside_tree())
|
||||||
break;
|
break;
|
||||||
control->emit_signal(SceneStringNames::get_singleton()->input_event,p_input);
|
control->emit_signal(SceneStringNames::get_singleton()->input_event,p_input);
|
||||||
if (!control->is_inside_tree() || control->is_set_as_toplevel()) {
|
if (!control->is_inside_tree() || control->is_set_as_toplevel())
|
||||||
break;
|
break;
|
||||||
}
|
if (gui.key_event_accepted)
|
||||||
if (gui.key_event_accepted)
|
break;
|
||||||
break;
|
if (control->data.stop_mouse && (p_input.type==InputEvent::MOUSE_BUTTON || p_input.type==InputEvent::MOUSE_MOTION))
|
||||||
if (control->data.stop_mouse && (p_input.type==InputEvent::MOUSE_BUTTON || p_input.type==InputEvent::MOUSE_MOTION))
|
break;
|
||||||
break;
|
}
|
||||||
}
|
|
||||||
|
|
||||||
if (ci->is_set_as_toplevel())
|
if (ci->is_set_as_toplevel())
|
||||||
break;
|
break;
|
||||||
|
|
||||||
ci=ci->get_parent_item();
|
ci=ci->get_parent_item();
|
||||||
}
|
}
|
||||||
|
|
||||||
//_unblock();
|
//_unblock();
|
||||||
|
|
Loading…
Reference in New Issue