mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 04:47:35 +00:00
Piano: Add track controls to the player widget
Adds the ability to add a track and cycle through the tracks from player widget. Also displays the current track being played or edited in a dropdown that allows for quick track selection.
This commit is contained in:
parent
2b47e1233b
commit
65df30d00c
7 changed files with 78 additions and 9 deletions
|
@ -56,15 +56,15 @@ MainWidget::~MainWidget()
|
|||
{
|
||||
}
|
||||
|
||||
void MainWidget::add_actions(GUI::Menu& menu)
|
||||
void MainWidget::add_track_actions(GUI::Menu& menu)
|
||||
{
|
||||
menu.add_action(GUI::Action::create("&Add Track", { Mod_Ctrl, Key_T }, [&](auto&) {
|
||||
m_track_manager.add_track();
|
||||
m_player_widget->add_track();
|
||||
}));
|
||||
|
||||
menu.add_action(GUI::Action::create("&Next Track", { Mod_Ctrl, Key_N }, [&](auto&) {
|
||||
turn_off_pressed_keys();
|
||||
m_track_manager.next_track();
|
||||
m_player_widget->next_track();
|
||||
turn_on_pressed_keys();
|
||||
|
||||
m_knobs_widget->update_knobs();
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue