- reformat to JUCE-Guidelines
- added Matrix => half working ;)
This commit is contained in:
parent
26a2935e1c
commit
ac22ea5e75
58 changed files with 1220 additions and 799 deletions
46
Source/Veno/Fonts/Fonts.cpp
Normal file
46
Source/Veno/Fonts/Fonts.cpp
Normal 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;
|
||||
}
|
||||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue