From aa5b8eba10fb1122c64c42122bfd48d7a7c7d745 Mon Sep 17 00:00:00 2001 From: Simon Howard Date: Fri, 20 Aug 2010 11:30:30 +0000 Subject: Extend mouse code to support up to 8 buttons (allows mouse wheel to be used). Subversion-branch: /trunk/chocolate-doom Subversion-revision: 1958 --- setup/txt_mouseinput.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'setup') diff --git a/setup/txt_mouseinput.c b/setup/txt_mouseinput.c index 05c89b39..8b87e651 100644 --- a/setup/txt_mouseinput.c +++ b/setup/txt_mouseinput.c @@ -91,7 +91,7 @@ static void GetMouseButtonDescription(int button, char *buf) strcpy(buf, "MID"); break; default: - sprintf(buf, "BUTTON #%i", button); + sprintf(buf, "BUTTON #%i", button + 1); break; } } @@ -153,7 +153,7 @@ static int TXT_MouseInputKeyPress(TXT_UNCAST_ARG(mouse_input), int mouse) static void TXT_MouseInputMousePress(TXT_UNCAST_ARG(widget), int x, int y, int b) { TXT_CAST_ARG(txt_mouse_input_t, widget); - + // Clicking is like pressing enter if (b == TXT_MOUSE_LEFT) -- cgit v1.2.3