You've already forked godot
mirror of
https://github.com/godotengine/godot.git
synced 2025-11-10 13:00:37 +00:00
Fix pausing in audio player editor acting the same as stopping
This commit is contained in:
@@ -53,7 +53,6 @@ void AudioStreamEditor::_notification(int p_what) {
|
|||||||
if (p_what == NOTIFICATION_PROCESS) {
|
if (p_what == NOTIFICATION_PROCESS) {
|
||||||
_current = _player->get_playback_position();
|
_current = _player->get_playback_position();
|
||||||
_indicator->update();
|
_indicator->update();
|
||||||
_preview->update();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
|
if (p_what == NOTIFICATION_VISIBILITY_CHANGED) {
|
||||||
@@ -121,15 +120,19 @@ void AudioStreamEditor::_play() {
|
|||||||
void AudioStreamEditor::_stop() {
|
void AudioStreamEditor::_stop() {
|
||||||
|
|
||||||
_player->stop();
|
_player->stop();
|
||||||
_on_finished();
|
_play_button->set_icon(get_icon("MainPlay", "EditorIcons"));
|
||||||
|
_current = 0;
|
||||||
|
_indicator->update();
|
||||||
|
set_process(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioStreamEditor::_on_finished() {
|
void AudioStreamEditor::_on_finished() {
|
||||||
|
|
||||||
_play_button->set_icon(get_icon("MainPlay", "EditorIcons"));
|
_play_button->set_icon(get_icon("MainPlay", "EditorIcons"));
|
||||||
|
if (_current == _player->get_stream()->get_length()) {
|
||||||
_current = 0;
|
_current = 0;
|
||||||
_indicator->update();
|
_indicator->update();
|
||||||
set_process(false);
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AudioStreamEditor::_draw_indicator() {
|
void AudioStreamEditor::_draw_indicator() {
|
||||||
|
|||||||
Reference in New Issue
Block a user