Cleanup
Some checks failed
Run ReCI Build Test / Explore-Gitea-Actions (push) Failing after 2m23s

This commit is contained in:
2024-07-12 01:47:49 -04:00
parent eb3e037c96
commit ae327b96a5
5 changed files with 36 additions and 13 deletions

View File

@@ -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);

View File

@@ -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();