Add shorthand for using singleton string names
This commit is contained in:
@ -846,7 +846,7 @@ void Window::set_visible(bool p_visible) {
|
||||
focused = false;
|
||||
}
|
||||
notification(NOTIFICATION_VISIBILITY_CHANGED);
|
||||
emit_signal(SceneStringNames::get_singleton()->visibility_changed);
|
||||
emit_signal(SceneStringName(visibility_changed));
|
||||
|
||||
RS::get_singleton()->viewport_set_active(get_viewport_rid(), visible);
|
||||
|
||||
@ -1321,7 +1321,7 @@ void Window::_notification(int p_what) {
|
||||
}
|
||||
if (visible) {
|
||||
notification(NOTIFICATION_VISIBILITY_CHANGED);
|
||||
emit_signal(SceneStringNames::get_singleton()->visibility_changed);
|
||||
emit_signal(SceneStringName(visibility_changed));
|
||||
RS::get_singleton()->viewport_set_active(get_viewport_rid(), true);
|
||||
}
|
||||
|
||||
@ -1337,7 +1337,7 @@ void Window::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_THEME_CHANGED: {
|
||||
emit_signal(SceneStringNames::get_singleton()->theme_changed);
|
||||
emit_signal(SceneStringName(theme_changed));
|
||||
_invalidate_theme_cache();
|
||||
_update_theme_item_cache();
|
||||
} break;
|
||||
@ -1404,11 +1404,11 @@ void Window::_notification(int p_what) {
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_VP_MOUSE_ENTER: {
|
||||
emit_signal(SceneStringNames::get_singleton()->mouse_entered);
|
||||
emit_signal(SceneStringName(mouse_entered));
|
||||
} break;
|
||||
|
||||
case NOTIFICATION_VP_MOUSE_EXIT: {
|
||||
emit_signal(SceneStringNames::get_singleton()->mouse_exited);
|
||||
emit_signal(SceneStringName(mouse_exited));
|
||||
} break;
|
||||
}
|
||||
}
|
||||
@ -1622,7 +1622,7 @@ void Window::_window_input(const Ref<InputEvent> &p_ev) {
|
||||
_input_from_window(p_ev);
|
||||
|
||||
if (p_ev->get_device() != InputEvent::DEVICE_ID_INTERNAL && is_inside_tree()) {
|
||||
emit_signal(SceneStringNames::get_singleton()->window_input, p_ev);
|
||||
emit_signal(SceneStringName(window_input), p_ev);
|
||||
}
|
||||
|
||||
if (is_inside_tree()) {
|
||||
|
||||
Reference in New Issue
Block a user