aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordec05eba <dec05eba@protonmail.com>2021-11-16 02:19:46 +0100
committerdec05eba <dec05eba@protonmail.com>2021-11-16 02:19:46 +0100
commitdcc00b359e313166f7f155bddc5cebc336c744b7 (patch)
treec3f83253f63467416d4b57c20faf73b683761678 /include
parent4c46bd7916ba692d75c5ee94099151b81695c48e (diff)
Text: add function to get character position by index, use same character loop everywhere
Diffstat (limited to 'include')
-rw-r--r--include/mgl/graphics/text.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/include/mgl/graphics/text.h b/include/mgl/graphics/text.h
index a645b0b..08a6c37 100644
--- a/include/mgl/graphics/text.h
+++ b/include/mgl/graphics/text.h
@@ -41,6 +41,8 @@ void mgl_text_set_font(mgl_text *self, mgl_font *font);
void mgl_text_set_position(mgl_text *self, mgl_vec2f position);
void mgl_text_set_color(mgl_text *self, mgl_color color);
mgl_vec2f mgl_text_get_bounds(const mgl_text *self);
+/* Returns the position of the character on the screen (relative to the current mgl_view) */
+mgl_vec2f mgl_text_find_character_pos(mgl_text *self, size_t index);
void mgl_text_draw(mgl_context *context, mgl_text *text);
#endif /* MGL_TEXT_H */