The Red Penguin

Create a PlaylistComponent in the Projucer project

Thursday 6 August 2020

1. Go to Projucer and add a new Component Class (split between a .cpp and a .h file). Then don't forget File > Save Project.

2. We want one playlist - not one for each deck - which we are going to add on the MainComponent. So in MainComponent.h add
#include "PlaylistComponent.h"

3. In private add the following:
PlaylistComponent playlistComponent;

4. In MainComponent.cpp go to the Main constructor and add

5. In resized() change the code to the following:
    deckGUI1.setBounds(0, 0, getWidth() / 2, getHeight() / 2);
deckGUI2.setBounds(getWidth() / 2, 0, getWidth() / 2, getHeight() / 2);
playlistComponent.setBounds(0, getHeight() / 2, getWidth(), getHeight() / 2);

On doing a compile and build this should now redraw the GUI.