agb icon indicating copy to clipboard operation
agb copied to clipboard

[agb] Colored Text

Open tolik518 opened this issue 1 year ago • 3 comments

I would also like to add a function to render colored text where you could set the palette directly in the string. I'm not sure if this should be part of the library, or rather of my game code.

I'd like to be able to do something along the lines like - while \f1 sets the foreground color to 1. I'd like to get some feedback on that.

writeln!(&mut writer, "\f1Hello \f2World")!

To not add any overhead to the commit function, I could imagine adding something like commit_rendered?

tolik518 avatar May 16 '24 08:05 tolik518

I just saw that something like this should already have been implemented but this doesn't seem to work when using TextRenderer on a background instead of the ObjectTextRenderer? Maybe I'm overseeing something - looks like I have to check it out later again.

Maybe the solution should be for me to use the ObjectTextRenderer, I'll have to investigate on that issue

tolik518 avatar May 16 '24 10:05 tolik518

Its likely that we never implemented it for the tiled TextRender. It's probably best to support the colour change field on that rather than adding new methods

gwilymk avatar May 16 '24 22:05 gwilymk

@gwilymk yeah I completely agree with you, it should just accept color change instead. When I created the issue I didn't know of the ObjectTextRenderer.

tolik518 avatar May 16 '24 22:05 tolik518

This will be fixed in the next release

gwilymk avatar May 04 '25 18:05 gwilymk