Text 1: Rendering and Editing

Milestones to Deleting Words with a Pixel Buffer.
As of: 2023-06-27

0. Open a Window

400 by 400 window with a yellow background

Notes

1. Draw a Rectangle

400 by 400 window with a yellow background and blue square

Notes

2. Draw a Single Character

The Letter A with proper anit-aliasing. The Letter A ignoring anti-aliasing The Letter A without lerped anti-aliasing]
Notes

3. Draw Hello World!

Hello World !Thingy!
Notes

4. Deleting Characters

Notes

5. Updating Characters

Notes

6. Drawing and Moving a Cursor

Notes

7. Cursor Display and Editing

Notes

8. Moving and Deleting by Word

Notes

Final Thoughts

This looks like the best stopping point. To get here, I had to treat the TextField like a black box entity with an API. To move the cursor left, I simply call the struct's cursor_left() or cursor_left_by_word() functions. The field itself then becomes the argument for the viewport's draw_text_field(). This implemendation doesn't support anything you'd expect from a rich text editor like colors and weight.

Next Up

Text 2: Building a Text Editor

Thank you.