Is it possible to change the width of the help text area?

General Tso

Panzer General
Joined
Oct 12, 2007
Messages
1,547
Location
U. S. of A.
Is it possible to change the width of the help text area? I'm talking about the area in the lower left of the screen above the current unit info box. It usually displays help text for the unit(s) under the mouse pointer. I found this line of code in CvMainInterface.py that looks like it should do what I want.

Code:
screen.setHelpTextArea(350, FontTypes.SMALL_FONT, 7, yResolution - 172, -0.1, False, "", True, False, CvUtil.FONT_LEFT_JUSTIFY, 150)

Unfortunately, it doesn't seem to work. According to the Python class reference the first passed variable is the width and the last passed variable is the minimum width. Changing these values doesn't seem to change anything. Does anybody have any ideas on what is wrong?
 
Thanks for the reply. I'm playing at 1920 x 1600, so thats probably not the problem. It's weird, I can move the help text to different area on the screen by changing the values sent to setHelpTextArea. But if I try to do something like changing the width or changing the font type (just as a test), they do nothing. It does seems like some of the passed values are being ignored or overridden. I can't find setHelpTextArea in the SDK. Does anybody out there know where this function (and the other functions for the screen object) are located?
 
Thanks for the suggestion xienwolf. Unfortunately it didn't help. My CvMainInterface.py is heavily edited and there is only one setHelpTextArea in it. Since your suggestion pointed out the difference between my mod and standard BTS I decided to do some testing with the standard version of BTS. I tried increasing the width in all 7 setHelpTextArea statements to 500, but nothing changed. I then tried setting all of the minimum widths to 500 and the width on the screen still didn't change. I then tried just about every possible combination of passed variables possible - still nothing. Does anybody have any further ideas?
 
You wouldn't happen to have some version of this file (like, perhaps, from BUG) in your Custom Assets folder, would you? If so, it is using that one instead of the one in your mod.
 
No that's not the case, When I make other changes (including the position of the help text area) the changes appear in the game.
 
Interesting, played with my own numbers a bit and you are correct, the width (first variable) has no effect on the help display at all. But you can easily/properly change where the thing is found with the appropriate other parameters.
 
Can anybody confirm that this problem can't be corrected in the SDK? I just started SDK programing about a week ago, so I kind of new at it. I have looked throughout the SDK and can not find anything that has anything to do with screens or setHelpTextArea.
 
Anybody know if there is any sort of layout control in the theme information that can restrict the size of the various display elements?

See the files in Resource/Themes.
There is, for example, one called Civ4Theme_ToolTip.thm which has things like:
Code:
// *** Main ToolTip control namespace 

with GFC_Control_ToolTip
{

	GFC_Control_DefaultToolTip_Style
which then has a part a little later that looks like:
Code:
		with .Size
		{
			.ExtraMargin						=	GRectMargin(10,4,10,4);
			.BorderMargin						=	GRectMargin(0,0,0,0);
			.ExtentMargin						=	GRectMargin(0,0,0,0);
			.MaxWidth							=	500;
			.MaxHeight							=	0;
		}

I don't know if this could be the problem. Or, if it is, what exactly needs to be changed in what file.
 
Good idea. I was able to change the background color of the help text area by editing one of the files in that folder, but I couldn't find anything that worked with the width. So close, yet so far. :sad:
 
Top Bottom