diff options
author | Simon Howard | 2011-06-13 22:21:37 +0000 |
---|---|---|
committer | Simon Howard | 2011-06-13 22:21:37 +0000 |
commit | 391e7466b1efb7cbede4a1c356a210d9e7ee616b (patch) | |
tree | 90d13346d9cd3636df44290ded13d59ae3712543 /src/setup/txt_mouseinput.c | |
parent | fa328faf056affa216f2f3a8764ca0d56262efe9 (diff) | |
parent | 822664b4ff873d462370e9e96a9d91e6066c221d (diff) | |
download | chocolate-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_mouseinput.c')
-rw-r--r-- | src/setup/txt_mouseinput.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/src/setup/txt_mouseinput.c b/src/setup/txt_mouseinput.c index 4f454c8c..c3e17299 100644 --- a/src/setup/txt_mouseinput.c +++ b/src/setup/txt_mouseinput.c @@ -42,7 +42,12 @@ static int MousePressCallback(txt_window_t *window, // Got the mouse press. Save to the variable and close the window. *mouse_input->variable = b - TXT_MOUSE_BASE; - TXT_EmitSignal(mouse_input, "set"); + + if (mouse_input->check_conflicts) + { + TXT_EmitSignal(mouse_input, "set"); + } + TXT_CloseWindow(window); return 1; @@ -53,6 +58,9 @@ static void OpenPromptWindow(txt_mouse_input_t *mouse_input) txt_window_t *window; txt_label_t *label; + // Silently update when the shift key is held down. + mouse_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, @@ -111,15 +119,7 @@ static void TXT_MouseInputDrawer(TXT_UNCAST_ARG(mouse_input), int selected) GetMouseButtonDescription(*mouse_input->variable, buf); } - if (selected) - { - TXT_BGColor(TXT_COLOR_GREY, 0); - } - else - { - TXT_BGColor(TXT_COLOR_BLUE, 0); - } - + TXT_SetWidgetBG(mouse_input, selected); TXT_FGColor(TXT_COLOR_BRIGHT_WHITE); TXT_DrawString(buf); |