parent
33a2b885b5
commit
884de984f3
@ -0,0 +1,22 @@
|
|||||||
|
#include "fonts.h"
|
||||||
|
#include "resourcemanager.h"
|
||||||
|
|
||||||
|
Fonts g_fonts;
|
||||||
|
|
||||||
|
Fonts::Fonts()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
Fonts::~Fonts()
|
||||||
|
{
|
||||||
|
}
|
||||||
|
|
||||||
|
bool Fonts::load()
|
||||||
|
{
|
||||||
|
std::list<std::string> files = g_resources.getDirectoryFiles("fonts");
|
||||||
|
for(std::list<std::string>::iterator it = files.begin(), end = files.end(); it != end; ++it) {
|
||||||
|
notice("File: %s", (*it).c_str());
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
|
}
|
@ -0,0 +1,27 @@
|
|||||||
|
#ifndef FONTS_H
|
||||||
|
#define FONTS_H
|
||||||
|
|
||||||
|
#include "prerequisites.h"
|
||||||
|
#include "rect.h"
|
||||||
|
|
||||||
|
struct Font
|
||||||
|
{
|
||||||
|
|
||||||
|
Rect textureArea[256];
|
||||||
|
};
|
||||||
|
|
||||||
|
class Fonts
|
||||||
|
{
|
||||||
|
public:
|
||||||
|
Fonts();
|
||||||
|
~Fonts();
|
||||||
|
|
||||||
|
bool load();
|
||||||
|
|
||||||
|
private:
|
||||||
|
std::map<int, Font*> mFonts;
|
||||||
|
};
|
||||||
|
|
||||||
|
extern Fonts g_fonts;
|
||||||
|
|
||||||
|
#endif // FONTS_H
|
Loading…
Reference in new issue