Hey guys,

I have always struggled with the positioning of Text with dx8, I normally go through a long haul of print screening and testing both sides of the text to see if they’re the same length. I have tried a lot of stuff in the past and thought I’d try again. These are what i have tried, with GUI_REWARDS been .Width = 350

RenderText Font_GeorgiaShadow, WordWrap(“This is a test”, GUIWindow(GUI_REWARDS).width / 2), (GUIWindow(GUI_REWARDS).width / 2 - Len(“This is a test”)), GUIWindow(GUI_REWARDS).height / 2, White

the above was just a quick throw together and the results were basically the same as the below:

RenderText Font_GeorgiaShadow, Trim$(“Rewsdfsdfsdfards”), 1 + EngineGetTextWidth(Font_Georgia, Trim$(“Rewsdfsdfsdfards”)))), GUIWindow(GUI_REWARDS).height / 2, White

Those are my latest attempts, I hate anything graphical but I manage to figure stuff out on my own. I admit defeat with this. I generally try for an hour or so, then turn back to my paint job to just get it over with but being able to do a simple equation would save me about 1-2 hours a month of hundreds of screen shots.


How the jobs do you center Text off using a mathematical equation? I am wanting it to be per gui_ not per game screen as some windows are not always centered off.