summaryrefslogtreecommitdiff
path: root/scene/gui
diff options
context:
space:
mode:
authorJuan Linietsky <reduzio@gmail.com>2014-11-05 21:20:42 -0300
committerJuan Linietsky <reduzio@gmail.com>2014-11-05 21:20:42 -0300
commit0dbedd18fc62f700e92a4cf581e505d849bc47ad (patch)
tree8f2c85b4d9227e441fd35ab4873009faa656bcba /scene/gui
parentd14baf6e41bcdbe4968e0513beccc09dfb160ecd (diff)
SceneMainLoop -> SceneTree
-=-=-=-=-=-=-=-=-=-=-=-=-=- *YOUR SOURCE MIGHT NOT WORK* For mor information on fix: https://github.com/okamstudio/godot/wiki/devel_scene_tree Other stuff: -Shower of bullets demo -Fixes all around
Diffstat (limited to 'scene/gui')
-rw-r--r--scene/gui/base_button.cpp4
-rw-r--r--scene/gui/button_group.cpp2
-rw-r--r--scene/gui/container.cpp6
-rw-r--r--scene/gui/control.cpp76
-rw-r--r--scene/gui/dialogs.cpp2
-rw-r--r--scene/gui/label.cpp2
-rw-r--r--scene/gui/line_edit.cpp2
-rw-r--r--scene/gui/option_button.cpp2
-rw-r--r--scene/gui/range.cpp4
-rw-r--r--scene/gui/reference_frame.cpp4
-rw-r--r--scene/gui/scroll_bar.cpp16
-rw-r--r--scene/gui/scroll_container.cpp2
-rw-r--r--scene/gui/spin_box.cpp2
-rw-r--r--scene/gui/text_edit.cpp10
-rw-r--r--scene/gui/tree.cpp10
-rw-r--r--scene/gui/video_player.cpp10
16 files changed, 77 insertions, 77 deletions
diff --git a/scene/gui/base_button.cpp b/scene/gui/base_button.cpp
index cf9fcfa72a..442fd286dd 100644
--- a/scene/gui/base_button.cpp
+++ b/scene/gui/base_button.cpp
@@ -211,7 +211,7 @@ void BaseButton::_notification(int p_what) {
}
}
- if (p_what==NOTIFICATION_ENTER_SCENE) {
+ if (p_what==NOTIFICATION_ENTER_TREE) {
CanvasItem *ci=this;
while(ci) {
@@ -227,7 +227,7 @@ void BaseButton::_notification(int p_what) {
}
}
- if (p_what==NOTIFICATION_EXIT_SCENE) {
+ if (p_what==NOTIFICATION_EXIT_TREE) {
if (group)
group->_remove_button(this);
diff --git a/scene/gui/button_group.cpp b/scene/gui/button_group.cpp
index 58b323c24d..94cc0a8d51 100644
--- a/scene/gui/button_group.cpp
+++ b/scene/gui/button_group.cpp
@@ -117,7 +117,7 @@ BaseButton *ButtonGroup::get_focused_button() const{
int ButtonGroup::get_pressed_button_index() const {
//in tree order, this is bizarre
- ERR_FAIL_COND_V(!is_inside_scene(),0);
+ ERR_FAIL_COND_V(!is_inside_tree(),0);
BaseButton *pressed = get_pressed_button();
if (!pressed)
diff --git a/scene/gui/container.cpp b/scene/gui/container.cpp
index 6543a0388d..bb61723acf 100644
--- a/scene/gui/container.cpp
+++ b/scene/gui/container.cpp
@@ -67,7 +67,7 @@ void Container::remove_child_notify(Node *p_child) {
void Container::_sort_children() {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
notification(NOTIFICATION_SORT_CHILDREN);
@@ -101,7 +101,7 @@ void Container::fit_child_in_rect(Control *p_child,const Rect2& p_rect) {
void Container::queue_sort() {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
if (pending_sort)
@@ -115,7 +115,7 @@ void Container::_notification(int p_what) {
switch(p_what) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
pending_sort=false;
queue_sort();
} break;
diff --git a/scene/gui/control.cpp b/scene/gui/control.cpp
index fc24294a70..aea0aacf42 100644
--- a/scene/gui/control.cpp
+++ b/scene/gui/control.cpp
@@ -183,7 +183,7 @@ bool Control::_set(const StringName& p_name, const Variant& p_value) {
void Control::_update_minimum_size() {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
data.pending_min_size_update=false;
@@ -341,7 +341,7 @@ void Control::_notification(int p_notification) {
switch(p_notification) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
if (data.window==this) {
@@ -365,7 +365,7 @@ void Control::_notification(int p_notification) {
window->drag_attempted=false;
window->drag_preview=NULL;
- if (get_scene()->is_editor_hint()) {
+ if (get_tree()->is_editor_hint()) {
Node *n = this;
while(n) {
@@ -385,7 +385,7 @@ void Control::_notification(int p_notification) {
_size_changed();
} break;
- case NOTIFICATION_EXIT_SCENE: {
+ case NOTIFICATION_EXIT_TREE: {
if (data.window) {
@@ -630,7 +630,7 @@ void Control::_notification(int p_notification) {
}
} break;
- case SceneMainLoop::NOTIFICATION_WM_UNFOCUS_REQUEST: {
+ case SceneTree::NOTIFICATION_WM_UNFOCUS_REQUEST: {
if (!window)
return;
@@ -710,7 +710,7 @@ void Control::drop_data(const Point2& p_point,const Variant& p_data){
void Control::force_drag(const Variant& p_data,Control *p_control) {
- ERR_FAIL_COND(!is_inside_scene());
+ ERR_FAIL_COND(!is_inside_tree());
ERR_FAIL_COND(!data.window);
ERR_FAIL_COND(p_data.get_type()==Variant::NIL);
@@ -728,8 +728,8 @@ void Control::set_drag_preview(Control *p_control) {
ERR_FAIL_NULL(p_control);
ERR_FAIL_COND( !((Object*)p_control)->cast_to<Control>());
- ERR_FAIL_COND(!is_inside_scene() || !data.window);
- ERR_FAIL_COND(p_control->is_inside_scene());
+ ERR_FAIL_COND(!is_inside_tree() || !data.window);
+ ERR_FAIL_COND(p_control->is_inside_tree());
ERR_FAIL_COND(p_control->get_parent()!=NULL);
if (data.window->window->drag_preview) {
@@ -963,8 +963,8 @@ void Control::_window_input_event(InputEvent p_event) {
if (top->data.modal_exclusive) {
//cancel event, sorry, modal exclusive EATS UP ALL
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
- get_scene()->set_input_as_handled();
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
+ get_tree()->set_input_as_handled();
return; // no one gets the event if exclusive NO ONE
}
@@ -1034,8 +1034,8 @@ void Control::_window_input_event(InputEvent p_event) {
_window_call_input(window->mouse_focus,p_event);
}
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
- get_scene()->set_input_as_handled();
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
+ get_tree()->set_input_as_handled();
} else {
@@ -1079,8 +1079,8 @@ void Control::_window_input_event(InputEvent p_event) {
}
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
- get_scene()->set_input_as_handled();
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
+ get_tree()->set_input_as_handled();
}
} break;
@@ -1147,7 +1147,7 @@ void Control::_window_input_event(InputEvent p_event) {
window->mouse_over=over;
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_cancel_tooltip");
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_tooltip");
if (window->drag_preview) {
window->drag_preview->set_pos(pos);
@@ -1203,8 +1203,8 @@ void Control::_window_input_event(InputEvent p_event) {
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
- get_scene()->set_input_as_handled();
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
+ get_tree()->set_input_as_handled();
if (window->drag_data.get_type()!=Variant::NIL && p_event.mouse_motion.button_mask&BUTTON_MASK_LEFT) {
@@ -1230,7 +1230,7 @@ void Control::_window_input_event(InputEvent p_event) {
if (window->key_event_accepted) {
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
break;
}
}
@@ -1290,7 +1290,7 @@ void Control::_window_input_event(InputEvent p_event) {
if (next) {
next->grab_focus();
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_cancel_input_ID",p_event.ID);
}
}
@@ -1305,7 +1305,7 @@ Control *Control::get_window() const {
bool Control::is_window() const {
- return (is_inside_scene() && window);
+ return (is_inside_tree() && window);
}
@@ -1607,7 +1607,7 @@ bool Control::has_constant(const StringName& p_name,const StringName& p_type) co
Size2 Control::get_parent_area_size() const {
- ERR_FAIL_COND_V(!is_inside_scene(),Size2());
+ ERR_FAIL_COND_V(!is_inside_tree(),Size2());
Size2 parent_size;
@@ -1624,7 +1624,7 @@ Size2 Control::get_parent_area_size() const {
void Control::_size_changed() {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
Size2 parent_size = get_parent_area_size();
@@ -1677,7 +1677,7 @@ void Control::_size_changed() {
float Control::_get_parent_range(int p_idx) const {
- if (!is_inside_scene()) {
+ if (!is_inside_tree()) {
return 1.0;
@@ -1748,7 +1748,7 @@ float Control::_a2s(float p_val, AnchorType p_anchor,float p_range) const {
void Control::set_anchor(Margin p_margin,AnchorType p_anchor) {
- if (!is_inside_scene()) {
+ if (!is_inside_tree()) {
data.anchor[p_margin]=p_anchor;
} else {
@@ -1980,7 +1980,7 @@ void Control::add_constant_override(const StringName& p_name, int p_constant) {
void Control::set_focus_mode(FocusMode p_focus_mode) {
- if (is_inside_scene() && p_focus_mode == FOCUS_NONE && data.focus_mode!=FOCUS_NONE && has_focus())
+ if (is_inside_tree() && p_focus_mode == FOCUS_NONE && data.focus_mode!=FOCUS_NONE && has_focus())
release_focus();
data.focus_mode=p_focus_mode;
@@ -2178,7 +2178,7 @@ bool Control::has_focus() const {
void Control::grab_focus() {
- ERR_FAIL_COND(!is_inside_scene());
+ ERR_FAIL_COND(!is_inside_tree());
ERR_FAIL_COND(!data.window);
if (data.focus_mode==FOCUS_NONE)
@@ -2188,7 +2188,7 @@ void Control::grab_focus() {
if (data.window->window->key_focus && data.window->window->key_focus==this)
return;
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_window_remove_focus");
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_window_remove_focus");
data.window->window->key_focus=this;
notification(NOTIFICATION_FOCUS_ENTER);
#ifdef DEBUG_ENABLED
@@ -2202,13 +2202,13 @@ void Control::grab_focus() {
void Control::release_focus() {
- ERR_FAIL_COND(!is_inside_scene());
+ ERR_FAIL_COND(!is_inside_tree());
ERR_FAIL_COND(!data.window);
if (!has_focus())
return;
- get_scene()->call_group(SceneMainLoop::GROUP_CALL_REALTIME,"windows","_window_remove_focus");
+ get_tree()->call_group(SceneTree::GROUP_CALL_REALTIME,"windows","_window_remove_focus");
//data.window->window->key_focus=this;
//notification(NOTIFICATION_FOCUS_ENTER);
update();
@@ -2217,12 +2217,12 @@ void Control::release_focus() {
bool Control::is_toplevel_control() const {
- return is_inside_scene() && (!data.parent_canvas_item && !window && is_set_as_toplevel());
+ return is_inside_tree() && (!data.parent_canvas_item && !window && is_set_as_toplevel());
}
void Control::show_modal(bool p_exclusive) {
- ERR_FAIL_COND(!is_inside_scene());
+ ERR_FAIL_COND(!is_inside_tree());
ERR_FAIL_COND(!data.SI && data.window!=this);
ERR_FAIL_COND(!data.window);
@@ -2282,7 +2282,7 @@ void Control::_modal_stack_remove() {
if (!pfoc)
return;
- if (!pfoc->is_inside_scene() || !pfoc->is_visible())
+ if (!pfoc->is_inside_tree() || !pfoc->is_visible())
return;
pfoc->grab_focus();
} else {
@@ -2332,13 +2332,13 @@ void Control::set_theme(const Ref<Theme>& p_theme) {
void Control::_window_accept_event() {
window->key_event_accepted=true;
- if (is_inside_scene())
- get_scene()->set_input_as_handled();
+ if (is_inside_tree())
+ get_tree()->set_input_as_handled();
}
void Control::accept_event() {
- if (is_inside_scene() && get_window())
+ if (is_inside_tree() && get_window())
get_window()->_window_accept_event();
}
@@ -2585,7 +2585,7 @@ float Control::get_stretch_ratio() const {
void Control::grab_click_focus() {
- ERR_FAIL_COND(!is_inside_scene());
+ ERR_FAIL_COND(!is_inside_tree());
if (data.window && data.window->window->mouse_focus) {
@@ -2620,7 +2620,7 @@ void Control::grab_click_focus() {
void Control::minimum_size_changed() {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
if (data.pending_min_size_update)
@@ -2663,7 +2663,7 @@ bool Control::is_stopping_mouse() const {
Control *Control::get_focus_owner() const {
- ERR_FAIL_COND_V(!is_inside_scene(),NULL);
+ ERR_FAIL_COND_V(!is_inside_tree(),NULL);
ERR_FAIL_COND_V(!window,NULL);
return window->key_focus;
}
diff --git a/scene/gui/dialogs.cpp b/scene/gui/dialogs.cpp
index 90393a1296..a82cfc7ea6 100644
--- a/scene/gui/dialogs.cpp
+++ b/scene/gui/dialogs.cpp
@@ -93,7 +93,7 @@ void WindowDialog::_notification(int p_what) {
} break;
case NOTIFICATION_THEME_CHANGED:
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
close_button->set_normal_texture( get_icon("close","WindowDialog"));
close_button->set_pressed_texture( get_icon("close","WindowDialog"));
diff --git a/scene/gui/label.cpp b/scene/gui/label.cpp
index 36940655d4..d2e1e7f0b9 100644
--- a/scene/gui/label.cpp
+++ b/scene/gui/label.cpp
@@ -339,7 +339,7 @@ int Label::get_longest_line_width() const {
int Label::get_line_count() const {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return 1;
if (word_cache_dirty)
const_cast<Label*>(this)->regenerate_word_cache();
diff --git a/scene/gui/line_edit.cpp b/scene/gui/line_edit.cpp
index a77a40327f..68c990033a 100644
--- a/scene/gui/line_edit.cpp
+++ b/scene/gui/line_edit.cpp
@@ -572,7 +572,7 @@ void LineEdit::set_cursor_pos(int p_pos) {
// set_window_pos(cursor_pos-get_window_lengt//h());
// }
- if (!is_inside_scene()) {
+ if (!is_inside_tree()) {
window_pos=cursor_pos;
return;
diff --git a/scene/gui/option_button.cpp b/scene/gui/option_button.cpp
index fa4a313115..78cc1bcdef 100644
--- a/scene/gui/option_button.cpp
+++ b/scene/gui/option_button.cpp
@@ -192,7 +192,7 @@ void OptionButton::_select(int p_idx,bool p_emit) {
set_text( popup->get_item_text( current ) );
set_icon( popup->get_item_icon( current ) );
- if (is_inside_scene() && p_emit)
+ if (is_inside_tree() && p_emit)
emit_signal("item_selected",current);
}
diff --git a/scene/gui/range.cpp b/scene/gui/range.cpp
index bc0fa9675e..4d0b678925 100644
--- a/scene/gui/range.cpp
+++ b/scene/gui/range.cpp
@@ -42,7 +42,7 @@ void Range::Shared::emit_value_changed() {
for (Set<Range*>::Element *E=owners.front();E;E=E->next()) {
Range *r=E->get();
- if (!r->is_inside_scene())
+ if (!r->is_inside_tree())
continue;
r->_value_changed_notify();
}
@@ -59,7 +59,7 @@ void Range::Shared::emit_changed() {
for (Set<Range*>::Element *E=owners.front();E;E=E->next()) {
Range *r=E->get();
- if (!r->is_inside_scene())
+ if (!r->is_inside_tree())
continue;
r->_changed_notify();
}
diff --git a/scene/gui/reference_frame.cpp b/scene/gui/reference_frame.cpp
index 679c2cc1e2..44ba3a8972 100644
--- a/scene/gui/reference_frame.cpp
+++ b/scene/gui/reference_frame.cpp
@@ -32,9 +32,9 @@ void ReferenceFrame::_notification(int p_what) {
if (p_what==NOTIFICATION_DRAW) {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
- if (get_scene()->is_editor_hint())
+ if (get_tree()->is_editor_hint())
draw_style_box(get_stylebox("border"),Rect2(Point2(),get_size())) ;
}
}
diff --git a/scene/gui/scroll_bar.cpp b/scene/gui/scroll_bar.cpp
index c661a804b3..aaf96114c6 100644
--- a/scene/gui/scroll_bar.cpp
+++ b/scene/gui/scroll_bar.cpp
@@ -293,7 +293,7 @@ void ScrollBar::_notification(int p_what) {
}
- if (p_what==NOTIFICATION_ENTER_SCENE) {
+ if (p_what==NOTIFICATION_ENTER_TREE) {
if (has_node(drag_slave_path)) {
@@ -303,16 +303,16 @@ void ScrollBar::_notification(int p_what) {
if (drag_slave) {
drag_slave->connect("input_event",this,"_drag_slave_input");
- drag_slave->connect("exit_scene",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT);
+ drag_slave->connect("exit_tree",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT);
}
}
- if (p_what==NOTIFICATION_EXIT_SCENE) {
+ if (p_what==NOTIFICATION_EXIT_TREE) {
if (drag_slave) {
drag_slave->disconnect("input_event",this,"_drag_slave_input");
- drag_slave->disconnect("exit_scene",this,"_drag_slave_exit");
+ drag_slave->disconnect("exit_tree",this,"_drag_slave_exit");
}
drag_slave=NULL;
@@ -635,18 +635,18 @@ void ScrollBar::_drag_slave_input(const InputEvent& p_input) {
void ScrollBar::set_drag_slave(const NodePath& p_path) {
- if (is_inside_scene()) {
+ if (is_inside_tree()) {
if (drag_slave) {
drag_slave->disconnect("input_event",this,"_drag_slave_input");
- drag_slave->disconnect("exit_scene",this,"_drag_slave_exit");
+ drag_slave->disconnect("exit_tree",this,"_drag_slave_exit");
}
}
drag_slave=NULL;
drag_slave_path=p_path;
- if (is_inside_scene()) {
+ if (is_inside_tree()) {
if (has_node(p_path)) {
Node *n = get_node(p_path);
@@ -655,7 +655,7 @@ void ScrollBar::set_drag_slave(const NodePath& p_path) {
if (drag_slave) {
drag_slave->connect("input_event",this,"_drag_slave_input");
- drag_slave->connect("exit_scene",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT);
+ drag_slave->connect("exit_tree",this,"_drag_slave_exit",varray(),CONNECT_ONESHOT);
}
}
}
diff --git a/scene/gui/scroll_container.cpp b/scene/gui/scroll_container.cpp
index c8f9ed16b5..95354df519 100644
--- a/scene/gui/scroll_container.cpp
+++ b/scene/gui/scroll_container.cpp
@@ -169,7 +169,7 @@ void ScrollContainer::_update_scrollbar_pos() {
void ScrollContainer::_notification(int p_what) {
- if (p_what == NOTIFICATION_ENTER_SCENE || p_what == NOTIFICATION_THEME_CHANGED) {
+ if (p_what == NOTIFICATION_ENTER_TREE || p_what == NOTIFICATION_THEME_CHANGED) {
call_deferred("_update_scrollbar_pos");
};
diff --git a/scene/gui/spin_box.cpp b/scene/gui/spin_box.cpp
index 59f4386996..9ac67e92f5 100644
--- a/scene/gui/spin_box.cpp
+++ b/scene/gui/spin_box.cpp
@@ -122,7 +122,7 @@ void SpinBox::_notification(int p_what) {
//_value_changed(0);
- } else if (p_what==NOTIFICATION_ENTER_SCENE) {
+ } else if (p_what==NOTIFICATION_ENTER_TREE) {
_value_changed(0);
}
diff --git a/scene/gui/text_edit.cpp b/scene/gui/text_edit.cpp
index 6aabfa35a8..4a0a77e6db 100644
--- a/scene/gui/text_edit.cpp
+++ b/scene/gui/text_edit.cpp
@@ -360,7 +360,7 @@ void TextEdit::_update_scrollbars() {
void TextEdit::_notification(int p_what) {
switch(p_what) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
_update_caches();
if (cursor_changed_dirty)
@@ -1868,7 +1868,7 @@ void TextEdit::_base_insert_text(int p_line, int p_char,const String& p_text,int
if (!text_changed_dirty && !setting_text) {
- if (is_inside_scene())
+ if (is_inside_tree())
MessageQueue::get_singleton()->push_call(this,"_text_changed_emit");
text_changed_dirty=true;
}
@@ -1921,7 +1921,7 @@ void TextEdit::_base_remove_text(int p_from_line, int p_from_column,int p_to_lin
if (!text_changed_dirty && !setting_text) {
- if (is_inside_scene())
+ if (is_inside_tree())
MessageQueue::get_singleton()->push_call(this,"_text_changed_emit");
text_changed_dirty=true;
}
@@ -2133,7 +2133,7 @@ void TextEdit::cursor_set_column(int p_col) {
if (!cursor_changed_dirty) {
- if (is_inside_scene())
+ if (is_inside_tree())
MessageQueue::get_singleton()->push_call(this,"_cursor_changed_emit");
cursor_changed_dirty=true;
}
@@ -2165,7 +2165,7 @@ void TextEdit::cursor_set_line(int p_row) {
if (!cursor_changed_dirty) {
- if (is_inside_scene())
+ if (is_inside_tree())
MessageQueue::get_singleton()->push_call(this,"_cursor_changed_emit");
cursor_changed_dirty=true;
}
diff --git a/scene/gui/tree.cpp b/scene/gui/tree.cpp
index a39c61ecac..db9142cb99 100644
--- a/scene/gui/tree.cpp
+++ b/scene/gui/tree.cpp
@@ -1499,7 +1499,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos,int x_ofs,int y_ofs,bool p_
case TreeItem::CELL_MODE_STRING: {
//nothing in particular
- if (select_mode==SELECT_MULTI && (get_scene()->get_last_event_id() == focus_in_id || !already_cursor)) {
+ if (select_mode==SELECT_MULTI && (get_tree()->get_last_event_id() == focus_in_id || !already_cursor)) {
bring_up_editor=false;
}
@@ -1575,7 +1575,7 @@ int Tree::propagate_mouse_event(const Point2i &p_pos,int x_ofs,int y_ofs,bool p_
editor_text=String::num( p_item->cells[col].val, Math::decimals( p_item->cells[col].step ) );
bring_up_value_editor=false;
- if (select_mode==SELECT_MULTI && get_scene()->get_last_event_id() == focus_in_id)
+ if (select_mode==SELECT_MULTI && get_tree()->get_last_event_id() == focus_in_id)
bring_up_editor=false;
}
@@ -2343,7 +2343,7 @@ void Tree::_notification(int p_what) {
if (p_what==NOTIFICATION_FOCUS_ENTER) {
- focus_in_id=get_scene()->get_last_event_id();
+ focus_in_id=get_tree()->get_last_event_id();
}
if (p_what==NOTIFICATION_MOUSE_EXIT) {
@@ -2353,7 +2353,7 @@ void Tree::_notification(int p_what) {
}
}
- if (p_what==NOTIFICATION_ENTER_SCENE) {
+ if (p_what==NOTIFICATION_ENTER_TREE) {
update_cache();;
}
@@ -2811,7 +2811,7 @@ int Tree::get_item_offset(TreeItem *p_item) const {
void Tree::ensure_cursor_is_visible() {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
TreeItem *selected = get_selected();
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp
index 0d77560d7b..857ea25d0f 100644
--- a/scene/gui/video_player.cpp
+++ b/scene/gui/video_player.cpp
@@ -32,10 +32,10 @@ void VideoPlayer::_notification(int p_notification) {
switch (p_notification) {
- case NOTIFICATION_ENTER_SCENE: {
+ case NOTIFICATION_ENTER_TREE: {
//set_idle_process(false); //don't annoy
- if (stream.is_valid() && autoplay && !get_scene()->is_editor_hint())
+ if (stream.is_valid() && autoplay && !get_tree()->is_editor_hint())
play();
} break;
@@ -48,7 +48,7 @@ void VideoPlayer::_notification(int p_notification) {
if (!stream->is_playing())
return;
- stream->update(get_scene()->get_idle_process_time());
+ stream->update(get_tree()->get_idle_process_time());
int prev_width = texture->get_width();
stream->pop_frame(texture);
if (prev_width == 0) {
@@ -118,7 +118,7 @@ Ref<VideoStream> VideoPlayer::get_stream() const {
void VideoPlayer::play() {
- ERR_FAIL_COND(!is_inside_scene());
+ ERR_FAIL_COND(!is_inside_tree());
if (stream.is_null())
return;
stream->play();
@@ -127,7 +127,7 @@ void VideoPlayer::play() {
void VideoPlayer::stop() {
- if (!is_inside_scene())
+ if (!is_inside_tree())
return;
if (stream.is_null())
return;