tech icon size in CvTechChooser.py

stefanhu

Chieftain
Joined
Jan 6, 2014
Messages
13
I would like to increase the tech icon size in the mentioned python file (as shown in the yellow tech button).



Could you please tell me how to do?
 
Well, you have to play with the figures in the file CvTechChooser.py.

A quick look at the top of the file shows: "TEXTURE_SIZE = 24".

Try to set it at 48. Then you'll probably have to adjust about every other definition of size...

Or you just locate the first button of the Tech and increase only this number (line 192 in BtS).

But where did you get the other image? From a Mod? Then try to copy the relevant part. Notepad++ is a free editor that can help you compare the two files.

It's not an easy job. It involves many trials and errors.
 
From ultrapack lol. Or vip and c2c which are using it.

Short answer: Not easy.
Long answer: Everything else is linked.
 
lol indeed! :D
 
That second picture is from my mod, History Rewritten. I recognise the icons. My CvTechChooser.py is a complete rewrite, based on Platyping's with numerous modifications. You won't be able to merge it with the default BTS version, better to start with the version from Platy's Ultrapack and adjust as needed.
 
Thanks to Ramkhamhaeng (from civforum.de) :)
It works with the following changes in CvTechChooser.py:

Code:
                        screen.setTextAt( szTechID, szTechRecord, szTechString, CvUtil.FONT_LEFT_JUSTIFY, iX + 6 + X_INCREMENT [COLOR="Red"]+ TEXTURE_SIZE[/COLOR], iY + 6, -0.1, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_TECH_TREE, i, -1 )
                        screen.setActivation( szTechID, ActivationTypes.ACTIVATE_MIMICPARENTFOCUS )

                        szTechButtonID = "TechButtonID" + str(i)
                        screen.addDDSGFCAt( szTechButtonID, szTechRecord, gc.getTechInfo(i).getButton(), iX + 6, iY + 8, TEXTURE_SIZE[COLOR="Red"]*2[/COLOR], TEXTURE_SIZE[COLOR="Red"]*2[/COLOR], WidgetTypes.WIDGET_TECH_TREE, i, -1, False )

                        fX = X_START [COLOR="Red"]+ 2*TEXTURE_SIZE[/COLOR]

Code:
 screen.setTextAt( szTechID, "TechList", szTechString, CvUtil.FONT_LEFT_JUSTIFY, iX + 6 + X_INCREMENT [COLOR="Red"]+ TEXTURE_SIZE[/COLOR], iY + 6, -0.1, FontTypes.SMALL_FONT, WidgetTypes.WIDGET_TECH_TREE, i, -1 )

@Xyth
Congratulations for this great mod. Especially the tech tree is most impressive !
 
Top Bottom