mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:57:44 +00:00
Piano: Add Play/Pause, Forward and Back buttons
Piano now has a toolbar allowing the playback to be paused, or to be stepped forward or back a note.
This commit is contained in:
parent
54c005754a
commit
74f1f2b5e2
10 changed files with 234 additions and 69 deletions
|
@ -8,6 +8,7 @@
|
|||
#include "MainWidget.h"
|
||||
#include "KeysWidget.h"
|
||||
#include "KnobsWidget.h"
|
||||
#include "PlayerWidget.h"
|
||||
#include "RollWidget.h"
|
||||
#include "SamplerWidget.h"
|
||||
#include "TrackManager.h"
|
||||
|
@ -17,8 +18,9 @@
|
|||
#include <LibGUI/Menu.h>
|
||||
#include <LibGUI/TabWidget.h>
|
||||
|
||||
MainWidget::MainWidget(TrackManager& track_manager)
|
||||
MainWidget::MainWidget(TrackManager& track_manager, AudioPlayerLoop& loop)
|
||||
: m_track_manager(track_manager)
|
||||
, m_audio_loop(loop)
|
||||
{
|
||||
set_layout<GUI::VerticalBoxLayout>();
|
||||
layout()->set_spacing(2);
|
||||
|
@ -35,6 +37,8 @@ MainWidget::MainWidget(TrackManager& track_manager)
|
|||
|
||||
m_tab_widget->add_tab<SamplerWidget>("Sampler", track_manager);
|
||||
|
||||
m_player_widget = add<PlayerWidget>(track_manager, loop);
|
||||
|
||||
m_keys_and_knobs_container = add<GUI::Widget>();
|
||||
m_keys_and_knobs_container->set_layout<GUI::HorizontalBoxLayout>();
|
||||
m_keys_and_knobs_container->layout()->set_spacing(2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue