Anti-aliasing WFN Font from TTF

Started by Amir, Sat 26/02/2022 10:24:55

Previous topic - Next topic

Snarky

#20
I'm not sure what action.Text is, but basically the function I linked draws text onto a sprite you have to supply. (It's actually a little bit more complicated than that: you have to create a DynamicSprite and then grab its DrawingSurface, which is what the function actually draws on.) Then you set that sprite as e.g. a button graphic, a GUI background, a Graphic Overlay, etc. in order to display it. You can see an example in this thread.

This means, specifically, that if you're currently using a Label to display the text, you'll have to change it a little, since you're rendering a sprite with the text instead. If the text is the only thing on this GUI, I would suggest simply setting the GUI background graphic to this sprite. If there are multiple things on the GUI I would replace the label by a button and set its graphic to the sprite.

Amir

#21
Quote from: Snarky on Mon 16/05/2022 22:25:56
I'm not sure what action.Text is, but basically the function I linked draws text onto a sprite you have to supply. (It's actually a little bit more complicated than that: you have to create a DynamicSprite and then grab its DrawingSurface, which is what the function actually draws on.) Then you set that sprite as e.g. a button graphic, a GUI background, a Graphic Overlay, etc. in order to display it. You can see an example in this thread.

This means, specifically, that if you're currently using a Label to display the text, you'll have to change it a little, since you're rendering a sprite with the text instead. If the text is the only thing on this GUI, I would suggest simply setting the GUI background graphic to this sprite. If there are multiple things on the GUI I would replace the label by a button and set its graphic to the sprite.

Thank u for the explanation but I think I'll do it differently which I like better. A gui with background and border over hotspots with the mouse cursor. But I have a problem. Can I post it here or in a new thread?


Edit: No problem anymore, I fixed it.  :)
Truly, truly, I say to you, blessed are those who play adventure games, for theirs is the kingdom of heaven.

SMF spam blocked by CleanTalk