MCPcopy Create free account
hub / github.com/HertzDevil/0CC-FamiTracker / GetShortcutString

Method GetShortcutString

Source/Accelerator.cpp:227–241  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

225}
226
227CStringW CAccelerator::GetShortcutString(int id) const { // // //
228 for (const auto &x : m_pEntriesTable) { // // //
229 if (x.id == id) {
230 CStringW KeyName = GetVKeyName(x.key);
231 if (KeyName.GetLength() > 1)
232 KeyName = KeyName.Mid(0, 1).MakeUpper() + KeyName.Mid(1, KeyName.GetLength() - 1).MakeLower();
233 if (x.mod > 0)
234 return FormattedW(L"\t%s+%s", MOD_NAMES[x.mod], (LPCWSTR)KeyName);
235 else
236 return FormattedW(L"\t%s", (LPCWSTR)KeyName);
237 }
238 }
239
240 return L"";
241}
242
243bool CAccelerator::IsKeyUsed(int nChar) const // // //
244{

Callers 1

UpdateMenuMethod · 0.80

Calls 2

FormattedWFunction · 0.85
GetLengthMethod · 0.45

Tested by

no test coverage detected