mirror of
https://github.com/RGBCube/serenity
synced 2025-10-16 10:52:06 +00:00
SoundPlayer: Optionally allow playback to loop indefinitely
This commit is contained in:
parent
75dec15b43
commit
90a30f694d
3 changed files with 19 additions and 1 deletions
|
@ -90,6 +90,14 @@ int main(int argc, char** argv)
|
|||
app->quit();
|
||||
}));
|
||||
|
||||
auto& playback_menu = menubar->add_menu("Playback");
|
||||
|
||||
auto loop = GUI::Action::create_checkable("Loop", { Mod_Ctrl, Key_R }, [&](auto& action) {
|
||||
player.manager().loop(action.is_checked());
|
||||
});
|
||||
|
||||
playback_menu.add_action(move(loop));
|
||||
|
||||
auto& help_menu = menubar->add_menu("Help");
|
||||
help_menu.add_action(GUI::Action::create("About", [&](auto&) {
|
||||
GUI::AboutDialog::show("SoundPlayer", Gfx::Bitmap::load_from_file("/res/icons/32x32/app-sound-player.png"), window);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue