Set textbox font at runtime

Started by Radiant, Sat 05/12/2015 19:06:56

Previous topic - Next topic

Radiant

I'm using the option "use GUI for dialog options"; so whenever the player has to choose a dialog option, a text window pops up.

How do I set the font for this window, at runtime? It doesn't appear to correspond to Game.Speechfont or Game.Normalfont, and the textbox itself doesn't have a font control.

Khris

According to the manual, Game.NormalFont is used for "dialog options text".
If that doesn't work, you can work around it with custom dialog options rendering.

Radiant

Nope, that doesn't work. Doing SetNormalFont(14) still has the dialog options rendered in the default font 1.

Crimson Wizard

#3
I just tried it out (AGS 3.3.4) with:
- default gui (black rectangle)
- custom GUI
- custom TextWindow.

Game.NormalFont works well in all 3 cases.
E: SetNormalFont() works too.

Are you sure this property is not changed somewhere else?

Radiant

Quote from: Crimson Wizard on Sun 06/12/2015 22:52:00
Are you sure this property is not changed somewhere else?

After more searching it turns yout you're hitting the nail on the head. Sorry :)

SMF spam blocked by CleanTalk