added node alignment and text color

This commit is contained in:
2017-02-07 13:39:17 +00:00
parent 3cc25e7592
commit 83e59573e0
7 changed files with 84 additions and 38 deletions

View File

@@ -5,6 +5,7 @@
enum class kFont : uint16_t
{
Arial_11 = const_hash("arial-11"),
Arial_30 = const_hash("arial-30"),
};
class Font
@@ -18,7 +19,7 @@ public:
Texture2D font_tex;
std::vector<stbtt_bakedchar> chars;
bool load(const char* ttf);
bool load(const char* ttf, int sz);
};
class FontManager
@@ -27,7 +28,7 @@ public:
static std::map<kFont, Font> m_fonts;
static Sampler m_sampler;
static void init();
static bool load(kFont id, const char* ttf);
static bool load(kFont id, const char* ttf, int sz);
static const Font& get(kFont id);
};