diff options
author | Juan Linietsky <reduzio@gmail.com> | 2017-01-10 18:02:19 -0300 |
---|---|---|
committer | Juan Linietsky <reduzio@gmail.com> | 2017-01-10 18:04:33 -0300 |
commit | f3f4a11cfb9767e1d691aec431dd2f1a87a31977 (patch) | |
tree | 7918ff8c7b366df911374c93d5077d27d788f9c3 /scene/gui | |
parent | 6eeb994a7bbd3cb1500c42af8f3ac1227f323ce4 (diff) |
- _ready() callback only happens once now, if you want to receive it again, use request_ready()
- C++ Nodes mostly do an internal process callback, so it does not conflict with users willing to use their own process callbacks
- callbacks such as _input, _process, _fixed_process _unhandled_input, _unhandled_key_input do not requiere calling a function to enable them. They are enabled automatically if found on the script.
Diffstat (limited to 'scene/gui')
-rw-r--r-- | scene/gui/video_player.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/scene/gui/video_player.cpp b/scene/gui/video_player.cpp index 4303b58c43..f7d2ad1c63 100644 --- a/scene/gui/video_player.cpp +++ b/scene/gui/video_player.cpp @@ -121,7 +121,7 @@ void VideoPlayer::_notification(int p_notification) { } } break; - case NOTIFICATION_PROCESS: { + case NOTIFICATION_INTERNAL_PROCESS: { if (stream.is_null()) return; @@ -233,7 +233,7 @@ void VideoPlayer::play() { return; playback->stop(); playback->play(); - set_process(true); + set_process_internal(true); AudioServer::get_singleton()->stream_set_active(stream_rid,true); AudioServer::get_singleton()->stream_set_volume_scale(stream_rid,volume); last_audio_time=0; @@ -249,7 +249,7 @@ void VideoPlayer::stop() { playback->stop(); AudioServer::get_singleton()->stream_set_active(stream_rid,false); resampler.flush(); - set_process(false); + set_process_internal(false); last_audio_time=0; }; @@ -266,7 +266,7 @@ void VideoPlayer::set_paused(bool p_paused) { paused=p_paused; if (playback.is_valid()) { playback->set_paused(p_paused); - set_process(!p_paused); + set_process_internal(!p_paused); }; last_audio_time = 0; }; |