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


1. Draw a Rectangle

400 by 400 window with a yellow background and blue square


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]

3. Draw Hello World!

Hello World !Thingy!

4. Deleting Characters


5. Updating Characters


6. Drawing and Moving a Cursor


7. Cursor Display and Editing


8. Moving and Deleting by Word


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.