Skip to content

Commit 204efc0

Browse files
author
Pier-Olivier Boulianne
committed
Fixed up looping
1 parent cb89216 commit 204efc0

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

StarEditor/src/Panels/SceneHierarchyPanel.cpp

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,25 @@ namespace StarEngine {
659659
audioSource->SetSpatialization(config.Spatialization);
660660
}
661661

662+
if (component.AudioSourceData.UsePlaylist)
663+
{
664+
// Looping is not available in playlist mode
665+
bool looping = false;
666+
audioSource->SetLooping(looping);
667+
config.Looping = looping;
668+
669+
ImGui::BeginDisabled();
670+
ImGui::Checkbox("Looping", &looping);
671+
ImGui::EndDisabled();
672+
}
673+
else
674+
{
675+
if (ImGui::Checkbox("Looping", &config.Looping))
676+
{
677+
audioSource->SetLooping(config.Looping);
678+
}
679+
}
680+
662681
if (component.AudioSourceData.UsePlaylist)
663682
{
664683
// Repeat Playlist

0 commit comments

Comments
 (0)