Just a hotdog post.

So i been working on this for like a couple weeks and i just want to show it off because its sooo un-rewarding.

So this is my prototype pure monogame textbox.

The debuging view is on here the bright white text in the box is what is visible when that is off.

https://i936.photobucket.com/albums/ad207/xlightwavex/programing%20and%20concepts/MyTextBoxWork_zps1hdgvres.png

There are basically 5 drawstring type methods i created to do it and a assortment of helper methods.

The class file is as fat as a pregnant cow but it works.

I modeled the behavior off the vs editing window.
It selects a character with the mouse.
It scrolls up or down with the mouse without changing the character index.
Lines up or down changing the character index with the arrow keys.
Left right increments decrements characters with the arrow keys.
Enters and Deletes and of course edits when typing.
It single keys then speeds up when a key is held using text input.
It’s able to re-wrap text to fit the window or any width that is set.
It doesn’t use drawstring instead it buffers all the text into a growable pooled vertice buffer.
It only rebuilds the buffer if editing occurs so it just keeps drawing the same buffered text till something changes.
I put scrollbars in it too.

2 Likes