X and Y of side bar???

vincentz

Programmer
Joined
Feb 4, 2009
Messages
3,614
Location
Denmark
Does anyone know how to adjust/mod the X and/or Y of the sidebar showing unit/terrain/city infos?

As shown on the picture, it can be quite difficult to determine which unit will defend when attacking a stack.

attachment.php
 
setHelpTextArea in Python\Screens\CvMainInterface.py sets the location of the help text. That function is called several different through out the file for placing the help text for the normal screen, globe view, etc. So you will probably need to change it in more than one location. X is the 3rd passed variable and y is the 4th. I just wish that the width could be changed, but for some reason that doesn't happen when the width variable is changed.
 
setHelpTextArea in Python\Screens\CvMainInterface.py sets the location of the help text. That function is called several different through out the file for placing the help text for the normal screen, globe view, etc. So you will probably need to change it in more than one location. X is the 3rd passed variable and y is the 4th. I just wish that the width could be changed, but for some reason that doesn't happen when the width variable is changed.

# Help Text Area
screen.setHelpTextArea( 350, FontTypes.SMALL_FONT, 7, yResolution - 172, -0.1, False, "", True, False, CvUtil.FONT_LEFT_JUSTIFY, HELP_TEXT_MINIMUM_WIDTH )

Ok, so the width of the help text area is determined at #3 passed variable (???)
I'm sorry but I have no idea what that means. Is it 7?

I noticed one thing though. If I do a mouseover on the uniticon on top of the buildorders, the width seem to be ok (approx same same as the box below). Is there anyway I can "copy" that behavior. Or could you pinpoint the location of the code displaying this.

attachment.php


BTW I use bull 1.1 if that has to do with anything.

That's a small screen...
It's not the size of the screen, but how you use it....

It's a standard 1280x800 laptop screen. Nothing unusual here. Carry on....
 
For those of you who forgot, there is an entire documented python resource here.

Judging from it's entry:
"VOID setHelpTextArea (FLOAT fWidth, FontType eFont, FLOAT fX, FLOAT fY, FLOAT fZ, BOOL bFloating, STRING szArtFile, BOOL bExpandRight, BOOL bExpandDown, INT uiFlags, INT iMinWidth)"

The X and Y are the 3rd and 4th arguments, and the width is the first.
 
vincentz:
In the example that you gave the help box is being displayed at x = 7, y = yResolution - 172, and as Afforess said the width is the first variable (350 in this case). Unfortunately, I have tried changing the width variable to every value imaginable and none of them have worked, the width remains the same. If anybody can find a way to change it. I to would be very interested.

I find your second picture interesting. In my game, that help box is the same width as the first one. Changing the x, y position in setHelpTextArea changes the position of both help boxes. Since your help boxes are different sizes there must be some way to change the width. If I can figure anything out I'll let you know. Does anybody else out there have any ideas?
 
Back
Top Bottom