diff options
author | GriffinR <griffin.g.richards@gmail.com> | 2021-10-15 22:46:43 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-15 22:46:43 -0400 |
commit | e1900efe1ead0e3344ca95a327b453617c807b6a (patch) | |
tree | 1f182808fc3f05d8e2accb0a3a9f47936debc0fd /src/naming_screen.c | |
parent | def6cc8158c09f3458866f1fa5983e58022c4101 (diff) | |
parent | a4a3c1c9e5a0026415330eab9bea2f8f3e83e0a3 (diff) |
Merge branch 'master' into doc-miscbattle
Diffstat (limited to 'src/naming_screen.c')
-rw-r--r-- | src/naming_screen.c | 35 |
1 files changed, 21 insertions, 14 deletions
diff --git a/src/naming_screen.c b/src/naming_screen.c index 19da9da02..f6558921b 100644 --- a/src/naming_screen.c +++ b/src/naming_screen.c @@ -286,19 +286,26 @@ static const struct WindowTemplate sWindowTemplates[WIN_COUNT + 1] = // This handles what characters get inserted when a key is pressed // The keys shown on the keyboard are handled separately by sNamingScreenKeyboardText -static const u8 sKeyboardChars[KBPAGE_COUNT * KBROW_COUNT * KBCOL_COUNT] = __( - "abcdef ." - "ghijkl ," - "mnopqrs " - "tuvwxyz " - "ABCDEF ." - "GHIJKL ," - "MNOPQRS " - "TUVWXYZ " - "01234 " - "56789 " - "!?♂♀/- " - "…“”‘' "); +static const u8 sKeyboardChars[KBPAGE_COUNT][KBROW_COUNT][KBCOL_COUNT] = { + [KEYBOARD_LETTERS_LOWER] = { + __("abcdef ."), + __("ghijkl ,"), + __("mnopqrs "), + __("tuvwxyz "), + }, + [KEYBOARD_LETTERS_UPPER] = { + __("ABCDEF ."), + __("GHIJKL ,"), + __("MNOPQRS "), + __("TUVWXYZ "), + }, + [KEYBOARD_SYMBOLS] = { + __("01234 "), + __("56789 "), + __("!?♂♀/- "), + __("…“”‘' "), + } +}; static const u8 sPageColumnCounts[KBPAGE_COUNT] = { [KEYBOARD_LETTERS_LOWER] = KBCOL_COUNT, @@ -1780,7 +1787,7 @@ static void DrawGenderIcon(void) static u8 GetCharAtKeyboardPos(s16 x, s16 y) { - return sKeyboardChars[x + y * KBCOL_COUNT + CurrentPageToKeyboardId() * KBCOL_COUNT * KBROW_COUNT]; + return sKeyboardChars[CurrentPageToKeyboardId()][y][x]; } |