Widget Hover Texts

platyping

Sleeping Dragon
Joined
Oct 22, 2010
Messages
4,626
Location
Emerald Dreams
Howdy, basically trying out another experiement.

Trying to implement Project Help Tag using python.
So far has already succeeded in displaying it in Civilopedia and Movie Screen.

But the problem is the hover texts for City Screen and Tech Bar.
Is there a way I can edit the existing texts so that I can stuff the effects in between the project name and cost just like the movie screen?

This is what I have done in CvGameUtils:
Code:
	def getWidgetHelp(self, argsList):
		eWidgetType, iData1, iData2, bOption = argsList
## Project Help Start ##
		if eWidgetType == WidgetTypes.WIDGET_CREATE or eWidgetType == WidgetTypes.WIDGET_PEDIA_JUMP_TO_PROJECT:
			sProjectHelp = CyTranslator().getText("TXT_KEY_" + gc.getProjectInfo(iData1).getType() + "_HELP",())
			if sProjectHelp.find("TXT_KEY") == -1:
				return "\n" + sProjectHelp
## Project Help End ##
		return u""
 
I don't know how to help with this, but I'll bet it won't work without some DLL changes to allow more python access to the widgets, which are normally handled in CvDLLWidgetData.
 
Hmm that's the sad part.
If I want to mess with dll to edit the widgets, might as well mess with dll to copy the help tag over from the other XMLs easier.
Just trying to see whether it is possible without dll editing, thanks :D
 
Top Bottom