johny smith
Deity
- Joined
- Mar 10, 2007
- Messages
- 2,273
Ok I am attempting to make a working scrolling civics screen, but I am not very experienced in coding. My problem is I get a symbol like this "[]" in front of the yield and commerce changes when I try to add some lines to the SDK to parse the civic info text for the help panel.
Here is what it looks like on a screenshot.
Now here is an example of the code changes in the SDK in the CvGameTextMgr.cpp that shows the text.
Now I can leave it alone in the SDK if I knew a function that would hide it in the python. And here is the code in the CvCivicsScreen.py that effects the same area as the example above.
Anyway the rest of the text works besides the yield and commerce changes text.
And here are the files if anyone can help me.
http://forums.civfanatics.com/uploads/112213/Civics_Screen.rar
I will appreciate it very much if anyone can help me figure what to do for this symbol. And I thank you ahead of time for reading this.
Here is what it looks like on a screenshot.

Now here is an example of the code changes in the SDK in the CvGameTextMgr.cpp that shows the text.
Code:
void CvGameTextMgr::parseCivicInfoYieldChangeHelpAllCities(CvWStringBuffer &szHelpText, CivicTypes eCivic, bool bCivilopediaText, bool bPlayerContext, bool bSkipName)
{
CvWStringBuffer szFirstBuffer;
// Yield Modifiers
setYieldChangeHelp(szHelpText, L"", L"", gDLL->getText("TXT_KEY_CIVIC_IN_ALL_CITIES").GetCString(), GC.getCivicInfo(eCivic).getYieldModifierArray(), true);
}
Now I can leave it alone in the SDK if I knew a function that would hide it in the python. And here is the code in the CvCivicsScreen.py that effects the same area as the example above.
Code:
if (CyGameTextMgr().parseCivicInfoYieldChangeHelpAllCities(iCivic, False, True, True) != "" ):
szHelpText = CyGameTextMgr().parseCivicInfoYieldChangeHelpAllCities(iCivic, False, True, True)
screen.setTextAt( szPaneIDYieldChangeHelpAllCities, "CivicList", u"<font=3>" + szHelpText + u"</font>", CvUtil.FONT_CENTER_JUSTIFY, fX , fY + 6, 0, FontTypes.GAME_FONT, WidgetTypes.WIDGET_GENERAL, -1, -1 )
fY += 2 * self.TEXT_MARGIN
Anyway the rest of the text works besides the yield and commerce changes text.
And here are the files if anyone can help me.
http://forums.civfanatics.com/uploads/112213/Civics_Screen.rar
I will appreciate it very much if anyone can help me figure what to do for this symbol. And I thank you ahead of time for reading this.