- reformat to JUCE-Guidelines

- added Matrix => half working ;)
This commit is contained in:
Maurice Grönwoldt 2020-06-13 16:52:16 +02:00
commit ac22ea5e75
58 changed files with 1220 additions and 799 deletions

View file

@ -0,0 +1,46 @@
//
// Created by versustune on 13.06.20.
//
#include "Fonts.h"
VenoFonts* VenoFonts::instance = new VenoFonts ();
Font* VenoFonts::getNormal ()
{
return getInstance ()->arvo;
}
Font* VenoFonts::getLCD ()
{
return getInstance ()->lcdFont;
}
VenoFonts* VenoFonts::getInstance ()
{
if (instance == nullptr)
{
instance = new VenoFonts ();
}
return instance;
}
void VenoFonts::destroyAll ()
{
delete instance;
instance = nullptr;
}
VenoFonts::VenoFonts ()
{
arvo = new Font (Typeface::createSystemTypefaceFor (BinaryData::arvo_ttf,
BinaryData::arvo_ttfSize));
lcdFont = new Font (Typeface::createSystemTypefaceFor (BinaryData::lcd_ttf,
BinaryData::lcd_ttfSize));
}
VenoFonts::~VenoFonts ()
{
delete arvo;
delete lcdFont;
}

View file

@ -7,19 +7,18 @@
#include "JuceHeader.h"
class VenoFonts {
class VenoFonts
{
protected:
static VenoFonts* instance;
Font* lcdFont;
Font* arvo;
public:
static const Font &getLCD() {
static Font lcd(Font(Typeface::createSystemTypefaceFor(BinaryData::lcd_ttf,
BinaryData::lcd_ttfSize)));
return lcd;
}
static const Font &getNormal() {
static Font arvo(Font(Typeface::createSystemTypefaceFor(BinaryData::arvo_ttf,
BinaryData::arvo_ttfSize)));
return arvo;
}
VenoFonts ();
~VenoFonts ();
static void destroyAll ();
static Font* getLCD ();
static Font* getNormal ();
static VenoFonts* getInstance ();
};
#endif //VENO_FONTS_H