diff options
author | dec05eba <dec05eba@protonmail.com> | 2021-10-19 22:12:52 +0200 |
---|---|---|
committer | dec05eba <dec05eba@protonmail.com> | 2021-10-19 22:12:52 +0200 |
commit | 9da3c2188060dc982412d7a6e1cd2051b9ddb6a6 (patch) | |
tree | 18d7cd9ec63c1f2e42dcda3941907f32e34ac241 /src/graphics/text.c | |
parent | 3bdf82eec2c915e91ae487e29d72639f9efcad67 (diff) |
Change from callback to window poll
Diffstat (limited to 'src/graphics/text.c')
-rw-r--r-- | src/graphics/text.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/graphics/text.c b/src/graphics/text.c index 0aa33cf..7f90216 100644 --- a/src/graphics/text.c +++ b/src/graphics/text.c @@ -42,7 +42,7 @@ void mgl_text_draw(mgl_context *context, mgl_text *text) { const char *str = text->text; mgl_font_glyph glyph; mgl_vec2f position = text->position; - position.y += text->font->size; + position.y += text->font->character_size; context->gl.glColor4ub(text->color.r, text->color.g, text->color.b, text->color.a); context->gl.glBindTexture(GL_TEXTURE_2D, text->font->texture.id); @@ -64,7 +64,7 @@ void mgl_text_draw(mgl_context *context, mgl_text *text) { } } else if(c == '\n') { position.x = text->position.x; - position.y += text->font->size; + position.y += text->font->character_size; } ++str; } |