PostString
DrekiSlayer
Member Posts: 5
Has anyone had any luck getting this function to work with anything other than the default font?
https://nwnlexicon.com/index.php?title=PostString
Some one has a picture on the Lexicon of some larger looking fonts but no example of how to properly use the sFont parameter.
No documentation not sure how to use other fonts. I was able to override the default but I want to do more would also love this to support larger fonts to add major benefit to cutscenes.
Here is some sample code :
object oPC = GetLastUsedBy();
int nColourRed = 0xFF0000FF;
int nFadeOut = 0x00000000;
PostString(oPC, "Test", 0, -20, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "Bitter");
PostString(oPC, "Test", 0, 0, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "Mordred Bold");
PostString(oPC, "Test", 0, 20, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "Brawler");
It compiles and puts some text on the screen at different locations but is exactly the same as this:
object oPC = GetLastUsedBy();
int nColourRed = 0xFF0000FF;
int nFadeOut = 0x00000000;
PostString(oPC, "Test", 0, -20, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "");
PostString(oPC, "Test", 0, 0, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "");
PostString(oPC, "Test", 0, 20, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "");
Any help would be greatly appreciated.
https://nwnlexicon.com/index.php?title=PostString
Some one has a picture on the Lexicon of some larger looking fonts but no example of how to properly use the sFont parameter.
No documentation not sure how to use other fonts. I was able to override the default but I want to do more would also love this to support larger fonts to add major benefit to cutscenes.
Here is some sample code :
object oPC = GetLastUsedBy();
int nColourRed = 0xFF0000FF;
int nFadeOut = 0x00000000;
PostString(oPC, "Test", 0, -20, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "Bitter");
PostString(oPC, "Test", 0, 0, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "Mordred Bold");
PostString(oPC, "Test", 0, 20, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "Brawler");
It compiles and puts some text on the screen at different locations but is exactly the same as this:
object oPC = GetLastUsedBy();
int nColourRed = 0xFF0000FF;
int nFadeOut = 0x00000000;
PostString(oPC, "Test", 0, -20, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "");
PostString(oPC, "Test", 0, 0, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "");
PostString(oPC, "Test", 0, 20, SCREEN_ANCHOR_CENTER, 20.0, nColourRed, nFadeOut, 0, "");
Any help would be greatly appreciated.
0
Comments
See https://nwn.wiki/display/NWN1/Fonts#Fonts-NWN:EETrueTypeFonts for more information.
I was able to get it work with some of the fonts mentioned there.