JujuAdams / Scribble

Efficient, internationalized, multi-effects text renderer for GameMaker
https://www.jujuadams.com/Scribble/
MIT License
335 stars 46 forks source link

being able to insert a character at the start of a new line #504

Open DirectalArrowYT opened 10 months ago

DirectalArrowYT commented 10 months ago

something that looks like this _set_newline_str(“text string “) the function idea is to be able to insert a string at the start of the new line.

=== example === text string LINE 1 text string LINE 2 text string LINE 3

SoupTaels commented 5 months ago

I'd love to use the text wrap feature, but it seems I'll have to manually add a new line for specific cases where I wanna add a default text at the beginning of a string and after every new line wrap.

Example pseudo code: 
///Original: 
var dial = scribble("Test text. Test text 2");
dial.wrap(50);
dial.draw(15, 15, dialtypist);

//Result: 
"Test text.
Test text 2."

///Text wrapping and default starting text: 
var dial = scribble("Test text. Test text 2");
dial.starting_format(fnt_test, c_white, "> ");
dial.wrap(50);
dial.draw(15, 15, dialtypist);

//Result: 
"> Test text.
 > Test text 2."

Hope that illustrated the point across. A feature like this would be awesome af tho. Can only hope! 🙏