Open WiIIiam278 opened 5 months ago
Hi, thanks for the suggestions!
Regarding the idea of rendering to a text box is okay, but the problem is determining where to cut the text. The monospaced functions just cut it whenever, but that is a pretty bad idea with VWF, I'd say...
For now, I've exposed DSF_StringRenderDryRun
in https://github.com/AntonioND/nitro-engine/commit/5ce71a9b02e74defa557ba5dc0f2f5244723f799 so that at least there is that option (I forgot to do it when I added the other functions!).
I'd like to draw text using rich text's quad drawing mode within a specific box region on a screen (ideally, wrapping the text if it goes over). With the monospace
NE_Text.h
API I could doNE_TextPrintBox
/NE_TextPrintBoxFree
to do this, or implement my own thing usingNE_TextPrintFree
since characters were of a constant known width.Since rich text is VWF and box drawing isn't a thing in
NE_RichText
, this isn't quite possible. It'd be great to expose a method to get the length of a string, as DSF exposesDSF_StringRenderDryRun
for this purpose, but the handle needed to call DSF methods is abstracted away by Nitro-Engine :).Similarly, an option to limit the number of characters to draw is no longer present (though of course this isn't a big deal as you can just trim the string before passing it). Still, it'd be nice to have this option.