Hello,
So I'm following with the book Getting Started With JUCE and I have come across a problem with one of the examples. I'm making a custom LookAndFeel inheriting from LookAndFeel and tring to create a LookAndFeel variable in MainContentComponent.h. The problem is that I get all of these errors. Such as:
Error: object of abstract class type "MainContentComponent::AltLookAndFeel" is not allowed:
pure virtual function "juce::LookAndFeel::drawSpinningWaitAnimation" has no overrider
... and so on with a huge list of member functions.
Here's the code I'm using. This code is straight from the book so I'm not sure what I'm doing wrong.
class MainContentComponent : public Component,
public Button::Listener {
public:
//==============================================================================
MainContentComponent();
void buttonClicked(Button* button);
void resized();
class AltLookAndFeel : public LookAndFeel {
public:
AltLookAndFeel()
{
setColour(Slider::thumbColourId, Colours::red);
}
};
private:
Slider slider1;
Slider slider2;
ToggleButton toggle1;
AltLookAndFeel altLookAndFeel; //============================================================================== JUCE_DECLARE_NON_COPYABLE_WITH_LEAK_DETECTOR (MainContentComponent)
};
