I'm working on a project where I would like to display some code on the screen, and I would like to add syntax highlighting.
I know that Gosu::Font recognizes XML tags so I used <c> tags to change text color.
But now, I would like to display these tags on the screen, but I don't know how to escape them...
Is it possible to realize ?
Thank you in advance.
Not sure if it'll work, and can't check atm, but wouldn't
It supports entities, e.g. "<" for "<", so just substitute them for the real characters.
It's working, thank you !
Other question ^_^
If I want to display '<' instead of '<', what should I do ?
(As for '<', is there an entity to display '&' ?)
(If there is, how can I know all those supported entities ?)
Oh, I found that those entities are HTML entities (sorry if my questions are stupid --')
So '&' would be '&'.
But one question remains : How can I know the list of "things" that are converted when they are drawn ?
You can't, that's a bit of a problem with Gosu currently. :( By default, Gosu only supports <, > and &.
Powered by mwForum 2.29.7 © 1999-2015 Markus Wichitill