Adventure Game Studio

AGS Support => Advanced Technical Forum => Topic started by: Radiant on Sat 05/12/2015 19:06:56

Title: Set textbox font at runtime
Post by: Radiant on Sat 05/12/2015 19:06:56
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.
Title: Re: Set textbox font at runtime
Post by: Khris on Sun 06/12/2015 20:34:21
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.
Title: Re: Set textbox font at runtime
Post by: Radiant on Sun 06/12/2015 21:34:56
Nope, that doesn't work. Doing SetNormalFont(14) still has the dialog options rendered in the default font 1.
Title: Re: Set textbox font at runtime
Post by: Crimson Wizard on Sun 06/12/2015 22:52:00
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?
Title: Re: Set textbox font at runtime
Post by: Radiant on Mon 07/12/2015 22:56:30
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 :)