CvHotKeyInfo::CreateHotKeyFromDescription(const char *, bool, bool, bool)
- Defined in
- CvInfos.cpp, line 314
- Class
- CvHotKeyInfo
- Hook name
CivHooks::CvHotKeyInfo_CreateHotKeyFromDescription
Hooks
static bool BeforeCvHotKeyInfo_CreateHotKeyFromDescription(const char* pszHotKey, bool bShift, bool bAlt, bool bCtrl, CvString& result);static void AfterCvHotKeyInfo_CreateHotKeyFromDescription(const char* pszHotKey, bool bShift, bool bAlt, bool bCtrl, CvString& result);static CvString ReplaceCvHotKeyInfo_CreateHotKeyFromDescription(CvString (*original)(const char*, bool, bool, bool), const char* pszHotKey, bool bShift, bool bAlt, bool bCtrl);CivRegisterBefore<CivHooks::CvHotKeyInfo_CreateHotKeyFromDescription>(host, &BeforeCvHotKeyInfo_CreateHotKeyFromDescription);CivRegisterAfter<CivHooks::CvHotKeyInfo_CreateHotKeyFromDescription>(host, &AfterCvHotKeyInfo_CreateHotKeyFromDescription);CivRegisterReplace<CivHooks::CvHotKeyInfo_CreateHotKeyFromDescription>(host, &ReplaceCvHotKeyInfo_CreateHotKeyFromDescription);
Code
314CvString CvHotKeyInfo::CreateHotKeyFromDescription(const char* pszHotKey, bool bShift, bool bAlt, bool bCtrl)315{316 CvString strHotKey;317318 if(pszHotKey && strcmp(pszHotKey,"") != 0)319 {320 if(bShift)321 {322 strHotKey += GetLocalizedText("TXT_KEY_SHIFT");323 }324325 if(bAlt)326 {327 strHotKey += GetLocalizedText("TXT_KEY_ALT");328 }329330 if(bCtrl)331 {332 strHotKey += GetLocalizedText("TXT_KEY_CTRL");333 }334335 strHotKey += CreateKeyStringFromKBCode(pszHotKey);336 }337338 return strHotKey;339}
Calls
- CvHotKeyInfo::CreateKeyStringFromKBCode(const char *)
CvString::CvStringCvString::CvString- GetLocalizedText(const char *)
std::basic_string::operator+=strcmp