This commit is contained in:
@@ -36,7 +36,7 @@ public:
|
||||
unsigned int getFontSize();
|
||||
unsigned int getFontIndex();
|
||||
CachedGlyph* getGlyph(char c);
|
||||
std::vector<CachedGlyph*>* getGlyphs();
|
||||
std::vector<CachedGlyph*> getGlyphs();
|
||||
CachedFont(unsigned int font_size, unsigned int font_index);
|
||||
};
|
||||
|
||||
@@ -44,7 +44,7 @@ class JGL::FontCache {
|
||||
private:
|
||||
std::vector<CachedFont*> cachedFonts = {};
|
||||
public:
|
||||
std::vector<CachedFont*>* getFonts();
|
||||
std::vector<CachedFont*> getFonts();
|
||||
CachedFont* getFont(unsigned int font_size, unsigned int font_index);
|
||||
void appendFont(CachedFont* font);
|
||||
void newFont(unsigned int font_size, unsigned int font_index);
|
||||
|
@@ -54,6 +54,7 @@ namespace JGL {
|
||||
bool Update(const Vector2& window_size);
|
||||
bool InitTextEngine();
|
||||
int LoadFont(const std::string& font_path);
|
||||
void PurgeFontCache();
|
||||
|
||||
void UnloadFont(int font_index);
|
||||
// TODO: implement correct coloring
|
||||
@@ -130,7 +131,8 @@ namespace JGL {
|
||||
// TODO: Implement an overload that simply takes 3 Vector3's
|
||||
|
||||
/// Draws a text string on the screen with a given point-size and font.
|
||||
void DrawString(const Color3& color, std::string text, float x, float y, float scale, u32 size, unsigned int font_index);
|
||||
void DrawString(const Color4& color, const std::string& text, float x, float y, float scale, u32 size, unsigned int font_index);
|
||||
void DrawString(const Color3& color, const std::string& text, float x, float y, float scale, u32 size, unsigned int font_index);
|
||||
|
||||
// TODO: Implement the following:
|
||||
void FillTexturedTriangle();
|
||||
|
Reference in New Issue
Block a user