Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[agb] Colored Text #699

Open
tolik518 opened this issue May 16, 2024 · 3 comments
Open

[agb] Colored Text #699

tolik518 opened this issue May 16, 2024 · 3 comments

Comments

@tolik518
Copy link
Contributor

tolik518 commented May 16, 2024

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 tolik518 changed the title Colored Text [agb] Colored Text May 16, 2024
@tolik518
Copy link
Contributor Author

tolik518 commented May 16, 2024

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

@gwilymk
Copy link
Contributor

gwilymk commented May 16, 2024

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

@tolik518
Copy link
Contributor Author

tolik518 commented May 16, 2024

@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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants