Skip to content

Commit

Permalink
Add Slovak virtual keyboard support
Browse files Browse the repository at this point in the history
relates to #8826
  • Loading branch information
ihhub committed Jul 14, 2024
1 parent 58ddec0 commit 4fcce12
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/fheroes2/gui/ui_keyboard.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ namespace
return false;
case fheroes2::SupportedLanguage::Polish:
case fheroes2::SupportedLanguage::Russian:
case fheroes2::SupportedLanguage::Slovak:
return true;
default:
break;
Expand Down Expand Up @@ -285,6 +286,7 @@ namespace
case fheroes2::SupportedLanguage::English:
case fheroes2::SupportedLanguage::Polish:
case fheroes2::SupportedLanguage::Russian:
case fheroes2::SupportedLanguage::Slovak:
return { "1234567890", "-:;()_+=", "[].,!'?" };
default:
// Did you add a new layout type? Add the logic above!
Expand All @@ -304,6 +306,8 @@ namespace
return { "\x8C\x8F\xA3\xA5\xAF\xC6\xCA\xD1\xD3", "QWERTYUIOP", "ASDFGHJKL", "ZXCVBNM" };
case fheroes2::SupportedLanguage::Russian:
return { "\xC9\xD6\xD3\xCA\xC5\xCD\xC3\xD8\xD9\xC7\xD5\xDA", "\xD4\xDB\xC2\xC0\xCF\xD0\xCE\xCB\xC4\xC6\xDD", "\xDF\xD7\xD1\xCC\xC8\xD2\xDC\xC1\xDE\xA8" };
case fheroes2::SupportedLanguage::Slovak:
return { "\xCF\xBC\x8A\xC8\x8D\x8E\xDD\xC1\xCD\xC9\xD3", "QWERTZUIOP\xDA", "ASDFGHJKL\xD4\xD2", "\xC4YXCVBNM\xC5\xC0" };
default:
// Did you add a new layout type? Add the logic above!
assert( 0 );
Expand All @@ -322,6 +326,8 @@ namespace
return { "\x9C\x9F\xB3\xB9\xBF\xE6\xEA\xF1\xF3", "qwertyuiop", "asdfghjkl", "zxcvbnm" };
case fheroes2::SupportedLanguage::Russian:
return { "\xE9\xF6\xF3\xEA\xE5\xED\xE3\xF8\xF9\xE7\xF5\xFA", "\xF4\xFB\xE2\xE0\xEF\xF0\xEE\xEB\xE4\xE6\xFD", "\xFF\xF7\xF1\xEC\xE8\xF2\xFC\xE1\xFE\xB8" };
case fheroes2::SupportedLanguage::Slovak:
return { "\xEF\xBE\x9A\xE8\x9D\x9E\xFD\xE1\xED\xE9\xF3", "qwertzuiop\xFA", "asdfghjkl\xF4\xF2", "\xE4yxcvbnm\xE5\xE0" };
default:
// Did you add a new layout type? Add the logic above!
assert( 0 );
Expand Down Expand Up @@ -363,6 +369,7 @@ namespace
case fheroes2::SupportedLanguage::Polish:
return 30;
case fheroes2::SupportedLanguage::Russian:
case fheroes2::SupportedLanguage::Slovak:
return 24;
default:
// Did you add a new supported language? Add the value above!
Expand Down Expand Up @@ -484,6 +491,7 @@ namespace
case fheroes2::SupportedLanguage::English:
case fheroes2::SupportedLanguage::Polish:
case fheroes2::SupportedLanguage::Russian:
case fheroes2::SupportedLanguage::Slovak:
addExtraStandardButtons( buttons, layoutType, isEvilInterface, isExtraLanguageSupported, language );
break;
default:
Expand Down

0 comments on commit 4fcce12

Please sign in to comment.