+
+ const float cursor_y_overflow = 10.0f;
+ const float cursor_width = 2.0f;
+
+ if (camera_render_text(
+ camera,
+ edit_field->buffer,
+ edit_field->font_size,
+ edit_field->font_color,
+ world_position) < 0) {
+ return -1;
+ }
+
+ if (camera_fill_rect(
+ camera,
+ rect(world_position.x + (float) edit_field->cursor * (float) FONT_CHAR_WIDTH * edit_field->font_size.x,
+ world_position.y - cursor_y_overflow,
+ cursor_width,
+ FONT_CHAR_HEIGHT * edit_field->font_size.y + cursor_y_overflow * 2.0f),
+ edit_field->font_color) < 0) {
+ return -1;
+ }