Sparth
C2C Team Member
- Joined
- Oct 6, 2013
- Messages
- 2,314
Im using this code
and
and
[/QUOTE]
for displaying great people portraits.
Each time GP is born his name is taken from <UniqueNames> tag from CIV4UnitInfos.xml
Im looking now for similar code for technologies. Every time new technology is discovered I want to display on tech splash screeen specific image.
One more thing: I dont want to use for this function getTechButton () because these images will be different then technology buttons.
Spoiler :
Code:
sGreat = ""
for i in xrange(Info.getNumUnitNames()):
sName = Info.getUnitNames(i)
if CyTranslator().getText(sName, ()) == sUnitName:
sGreat = sName[8:]
break
and
Code:
if sGreat:
sPortrait = ""
sIcon = ""
sArtDef = CyArtFileMgr().getInterfaceArtInfo("ART_DEF_" + sGreat)
if sArtDef:
sPortrait = sArtDef.getPath()
sBack = ""
sType = Info.getType()
if sType in self.GreatPeople:
sIcon = self.GreatPeople[sType]
sArtDef= CyArtFileMgr().getInterfaceArtInfo(sIcon)
if sArtDef:
sBack = sArtDef.getPath()
else:
return
and
Code:
screen.addDDSGFC("GreatPersonPortrait", sPortrait, self.X_PERSON_PORTRAIT, self.Y_PERSON_PORTRAIT, self.W_PERSON_PORTRAIT, self.H_PERSON_PORTRAIT, WidgetTypes.WIDGET_GENERAL, -1, -1)
for displaying great people portraits.
Each time GP is born his name is taken from <UniqueNames> tag from CIV4UnitInfos.xml
Im looking now for similar code for technologies. Every time new technology is discovered I want to display on tech splash screeen specific image.
One more thing: I dont want to use for this function getTechButton () because these images will be different then technology buttons.