summaryrefslogtreecommitdiff
path: root/src/setup/txt_keyinput.c
diff options
context:
space:
mode:
authorSimon Howard2011-06-13 22:21:37 +0000
committerSimon Howard2011-06-13 22:21:37 +0000
commit391e7466b1efb7cbede4a1c356a210d9e7ee616b (patch)
tree90d13346d9cd3636df44290ded13d59ae3712543 /src/setup/txt_keyinput.c
parentfa328faf056affa216f2f3a8764ca0d56262efe9 (diff)
parent822664b4ff873d462370e9e96a9d91e6066c221d (diff)
downloadchocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.tar.gz
chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.tar.bz2
chocolate-doom-391e7466b1efb7cbede4a1c356a210d9e7ee616b.zip
Merge from trunk.
Subversion-branch: /branches/raven-branch Subversion-revision: 2347
Diffstat (limited to 'src/setup/txt_keyinput.c')
-rw-r--r--src/setup/txt_keyinput.c21
1 files changed, 11 insertions, 10 deletions
diff --git a/src/setup/txt_keyinput.c b/src/setup/txt_keyinput.c
index 08eb9d8c..6f1ee4dd 100644
--- a/src/setup/txt_keyinput.c
+++ b/src/setup/txt_keyinput.c
@@ -42,7 +42,12 @@ static int KeyPressCallback(txt_window_t *window, int key,
// Got the key press. Save to the variable and close the window.
*key_input->variable = key;
- TXT_EmitSignal(key_input, "set");
+
+ if (key_input->check_conflicts)
+ {
+ TXT_EmitSignal(key_input, "set");
+ }
+
TXT_CloseWindow(window);
// Re-enable key mappings now that we have the key
@@ -67,6 +72,10 @@ static void OpenPromptWindow(txt_key_input_t *key_input)
txt_window_t *window;
txt_label_t *label;
+ // Silently update when the shift button is held down.
+
+ key_input->check_conflicts = !TXT_GetModifierState(TXT_MOD_SHIFT);
+
window = TXT_NewWindow(NULL);
TXT_SetWindowAction(window, TXT_HORIZ_LEFT, NULL);
TXT_SetWindowAction(window, TXT_HORIZ_CENTER,
@@ -118,15 +127,7 @@ static void TXT_KeyInputDrawer(TXT_UNCAST_ARG(key_input), int selected)
TXT_GetKeyDescription(*key_input->variable, buf);
}
- if (selected)
- {
- TXT_BGColor(TXT_COLOR_GREY, 0);
- }
- else
- {
- TXT_BGColor(TXT_COLOR_BLUE, 0);
- }
-
+ TXT_SetWidgetBG(key_input, selected);
TXT_FGColor(TXT_COLOR_BRIGHT_WHITE);
TXT_DrawString(buf);