// // Copyright(C) 2005-2014 Simon Howard // // This program is free software; you can redistribute it and/or // modify it under the terms of the GNU General Public License // as published by the Free Software Foundation; either version 2 // of the License, or (at your option) any later version. // // This program is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the // GNU General Public License for more details. // #include #include "textscreen.h" #include "doomtype.h" #include "m_config.h" #include "m_controls.h" #include "execute.h" #include "txt_mouseinput.h" #include "mode.h" #include "mouse.h" #define WINDOW_HELP_URL "http://www.chocolate-doom.org/setup-mouse" static int usemouse = 1; static int mouseSensitivity = 5; static float mouse_acceleration = 2.0; static int mouse_threshold = 10; static int grabmouse = 1; int novert = 0; static int *all_mouse_buttons[] = { &mousebfire, &mousebstrafe, &mousebforward, &mousebstrafeleft, &mousebstraferight, &mousebbackward, &mousebuse, &mousebjump, &mousebprevweapon, &mousebnextweapon }; static void MouseSetCallback(TXT_UNCAST_ARG(widget), TXT_UNCAST_ARG(variable)) { TXT_CAST_ARG(int, variable); unsigned int i; // Check if the same mouse button is used for a different action // If so, set the other action(s) to -1 (unset) for (i=0; i