Bazaar developer reference

CvGame::BuildProdModHelpText(CvString *, const char *, int, const char *) const

Defined in
CvGame.cpp, line 10976
Class
CvGame
Hook name
CivHooks::CvGame_BuildProdModHelpText

Hooks

static bool BeforeCvGame_BuildProdModHelpText(const CvGame* self, CvString* toolTipSink, const char* strTextKey, int iMod, const char* strExtraKey);static void AfterCvGame_BuildProdModHelpText(const CvGame* self, CvString* toolTipSink, const char* strTextKey, int iMod, const char* strExtraKey);static void ReplaceCvGame_BuildProdModHelpText(void (*original)(const CvGame*, CvString*, const char*, int, const char*), const CvGame* self, CvString* toolTipSink, const char* strTextKey, int iMod, const char* strExtraKey);CivRegisterBefore<CivHooks::CvGame_BuildProdModHelpText>(host, &BeforeCvGame_BuildProdModHelpText);CivRegisterAfter<CivHooks::CvGame_BuildProdModHelpText>(host, &AfterCvGame_BuildProdModHelpText);CivRegisterReplace<CivHooks::CvGame_BuildProdModHelpText>(host, &ReplaceCvGame_BuildProdModHelpText);

Code

10975/// Shortcut for generating production mod tool tip help10976void CvGame::BuildProdModHelpText(CvString* toolTipSink, const char* strTextKey, int iMod, const char* strExtraKey) const10977{10978	if(iMod != 0 && toolTipSink != NULL)10979	{10980		Localization::String localizedText = Localization::Lookup(strTextKey);10981		localizedText << iMod;1098210983		if(strExtraKey)10984		{10985			std::string extraKey(strExtraKey);10986			if(!extraKey.empty())10987				localizedText << strExtraKey;1098810989			const char* const localized = localizedText.toUTF8();10990			if(localized)10991				(*toolTipSink) += localized;10992		}10993	}10994}

Calls

Called by