// Emacs style mode select -*- C++ -*- //----------------------------------------------------------------------------- // // Copyright(C) 2006 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. // // You should have received a copy of the GNU General Public License // along with this program; if not, write to the Free Software // Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA // 02111-1307, USA. // #include #include "textscreen.h" #include "doomtype.h" #include "execute.h" #include "txt_mouseinput.h" #include "mouse.h" int usemouse = 1; int novert = 0; int mouseSensitivity = 5; float mouse_acceleration = 2.0; int mouse_threshold = 10; int grabmouse = 1; int mousebfire = 0; int mousebforward = 1; int mousebstrafe = 2; int mousebstrafeleft = -1; int mousebstraferight = -1; int mousebbackward = -1; int mousebuse = -1; int mousebprevweapon = -1; int mousebnextweapon = -1; int dclick_use = 1; static int *all_mouse_buttons[] = { &mousebfire, &mousebstrafe, &mousebforward, &mousebstrafeleft, &mousebstraferight, &mousebbackward, &mousebuse, &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