CvHotKeyInfo::getHotKeyDescription() const
- Defined in
- CvInfos.cpp, line 670
- Class
- CvHotKeyInfo
- Hook name
CivHooks::CvHotKeyInfo_getHotKeyDescription
Hooks
static bool BeforeCvHotKeyInfo_getHotKeyDescription(const CvHotKeyInfo* self, std::string& result);static void AfterCvHotKeyInfo_getHotKeyDescription(const CvHotKeyInfo* self, std::string& result);static std::string ReplaceCvHotKeyInfo_getHotKeyDescription(std::string (*original)(const CvHotKeyInfo*), const CvHotKeyInfo* self);CivRegisterBefore<CivHooks::CvHotKeyInfo_getHotKeyDescription>(host, &BeforeCvHotKeyInfo_getHotKeyDescription);CivRegisterAfter<CivHooks::CvHotKeyInfo_getHotKeyDescription>(host, &AfterCvHotKeyInfo_getHotKeyDescription);CivRegisterReplace<CivHooks::CvHotKeyInfo_getHotKeyDescription>(host, &ReplaceCvHotKeyInfo_getHotKeyDescription);
Code
670std::string CvHotKeyInfo::getHotKeyDescription() const671{672 Localization::String strTempText;673 std::string strHotKeyDescription;674 if(!m_strHotKeyAltDescriptionKey.empty())675 {676 strTempText = "{1: textkey} ({2: textkey})";677 strTempText << m_strHotKeyAltDescriptionKey.c_str();678 strTempText << m_strHotKeyDescriptionKey.c_str();679 }680 else681 {682 strTempText = Localization::Lookup(m_strHotKeyDescriptionKey.c_str());683 }684685 strHotKeyDescription = strTempText.toUTF8();686687 if(!m_strHotKeyString.empty())688 {689 strHotKeyDescription += m_strHotKeyString;690 }691692 return strHotKeyDescription;693}
Calls
Localization::LookupLocalization::String::operator=Localization::String::operator=Localization::String::StringLocalization::String::toUTF8operator<<std::basic_string::basic_stringstd::basic_string::basic_stringstd::basic_string::c_strstd::basic_string::emptystd::basic_string::operator+=std::basic_string::operator=