summaryrefslogtreecommitdiff
path: root/src/client
diff options
context:
space:
mode:
authorTomas 'ZeXx86' Jedrzejek <zexx86@gmail.com>2009-04-18 21:38:03 +0200
committerTomas 'ZeXx86' Jedrzejek <zexx86@gmail.com>2009-04-18 21:38:03 +0200
commitce19d33b99ba02fb29297a21bf88d830e708cb27 (patch)
tree928c3e0639540742564eb07df7b9f1c7223ce2ab /src/client
parent9964d4c7f92344d66b92279a03b8c8130fd2fa1a (diff)
In-Game Chat was improved - Upper-Letter support + Additional character set; Optimalization of
widget_textfield's readKey ()
Diffstat (limited to 'src/client')
-rw-r--r--src/client/chat.c12
1 files changed, 10 insertions, 2 deletions
diff --git a/src/client/chat.c b/src/client/chat.c
index 9d35519..ca98389 100644
--- a/src/client/chat.c
+++ b/src/client/chat.c
@@ -143,13 +143,21 @@ static void processMessageKey(SDL_keysym keysym)
/* here would be much better to put 'strcat' as 'line' is expected
* to be full of '0' up to its end
*/
- line[len] = keysym.sym;
+ char c = keysym.sym;
+
+ /* TODO: should correspond with ASCII table */
+ if (keysym.mod & KMOD_RSHIFT)
+ c --;
+
+ line[len] = c;
+ return;
}
/* processing of letters */
if (keysym.sym >= SDLK_a && keysym.sym <= SDLK_z) {
char c = keysym.sym;
- if (keysym.mod == KMOD_SHIFT) {
+
+ if (keysym.mod & KMOD_SHIFT) {
c = toupper(c);
}
/* here would be much better to put 'strcat' as 'line' is expected