Disabling the cursor?

All things BZFlag - no [OT] here please
.Zero
Private First Class
Private First Class
Posts: 36
Joined: Tue Mar 20, 2007 8:33 pm

Post by .Zero »

CannonBallGuy wrote:Enjoy noobuntu. :)
I am :D
2.2 will have an option to hide the mouse when you spawn. If you bump the mouse it will re-appear till you spawn again, for users who use keyboard
Now that sounds good! 2.2 seems very far away...
First, get Suse. Second burn your System 7 alive. System 7 is so old I would give you my Mac os 9 CD just to get rid of it... (/me is kidding)
I never liked SUSE. I tried SLED 10 RC3 for a couple weeks but never got into it. Ubuntu is a nice starting point for me. I spend a lot of time in the console and learning how Debian does things. I have been thinking about going straight Debian or maybe Gentoo when I learn enough not to nuke it. I've managed not to nuke Ubuntu so far, despite all the things I've done to it...
No it wouldn't. There is no way to use it for gain. I have AutoHotKey and I can make you a script to do it easy (I run a script in the background to correct common mispellings in bzflag... like "teh")

if you want the script just PM me.
I would love to have the script, but isn't AutoHotKey Windows only?
The way I was thinking of doing it was using a program I found called movemouse and using xbindkeys to run that everytime the fire button is pressed. I think the only thing I have to figure out now is how to unbind the key automatically when bzflag exits.
User avatar
CannonBallGuy
Private First Class
Private First Class
Posts: 2083
Joined: Wed Apr 12, 2006 1:31 am
Contact:

Post by CannonBallGuy »

BinarySpike wrote:Do you use keyboard only? (aka mouse turned off)
My mouse, believe it or not, has no "Off" button or setting.
Do you mean, what do I have as my "Input Device" in bzflag?
Whether I set it to auto or keyboard, makes little difference.
With both settings, you can move the mouse anywhere you like and continue to drive with the keyboard.
BinarySpike wrote:Cause on Mac os X the mouse does _center_. On 10.2, 10.3, and 10.4. Bzflag centers it not your OS.
It does not at all with "auto" input device, on 10.3.9 or 10.4.9.
On these 2 OS X versions, it does initially centre with "keyboard" input device, but can then be moved anywhere you like.
If a heck load of people not using a certain OS have a problem that a user on that OS doesn't... it's kinda fair to assume they would be more content using that OS.
Image

Merry Christmas!

"Look, if I don't buy booze for the kids, I don't get any incriminating pictures to show to their parents, my business goes down the sink, my girlfriend leaves me and the baby goes on ebay. So help me search..."

"go Play With Toys urself in a dark alley u donkey ******" - Lt-Kirby2007
User avatar
BinarySpike
Corporal
Corporal
Posts: 735
Joined: Mon Mar 28, 2005 11:58 pm
Contact:

Post by BinarySpike »

.Zero wrote: I would love to have the script, but isn't AutoHotKey Windows only?
The way I was thinking of doing it was using a program I found called movemouse and using xbindkeys to run that everytime the fire button is pressed. I think the only thing I have to figure out now is how to unbind the key automatically when bzflag exits.
Ah your right, :evil: it's a good program though.
.Zero
Private First Class
Private First Class
Posts: 36
Joined: Tue Mar 20, 2007 8:33 pm

Post by .Zero »

Alright! I found a better solution.
In MainWindow.cxx, I simply commented out the warpMouse() function and recompiled. Now my mouse stays where I want it to and I didn't have to mess with another program to do it for me :D
User avatar
toms2005
Private First Class
Private First Class
Posts: 9
Joined: Sat Apr 07, 2007 4:54 pm
Location: devant mon pc
Contact:

Post by toms2005 »

me put the cursor in the middle and i use the keyboard for moving and mouse for shooting :D :D :D
User avatar
plokijuy
Private First Class
Private First Class
Posts: 83
Joined: Sat Apr 23, 2005 1:42 pm
Location: lergi

Post by plokijuy »

if you use use windows i might be able to help you.
Image
anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Post by anomaly »

A menu option to hide the cursor seems like a good choice. The menu is accessed through the keyboard anyway. Calling SDL_ShowCursor(SDL_DISABLE) will hide the mouse cursor and calling SDL_ShowCursor(SDL_ENABLE) will show it again. You could even map it to the keyboard. If someone wants to create patches for 2.0.x and 2.1.x that might solve .Zero's issue. Maybe .Zero will do this.

Edit:
Actually this is not as easy as it seemed. One would need to implement the virtual functions showMouse() and hideMouse() in the platform files. Could start with SDLDisplay.cxx/.h. Can't use SDL_ShowCursor in main code and maintain portability. Look at warpMouse() in BzfWindow.h to see what I mean.

Edit: (again)
Here is a patch that will work. It adds a menu item in the Input Menu to show|hide the mouse cursor. This is patched against the current 2.0.9 version in SVN. (wasn't as dificult as I thought) Note that I implemented in SDL only. Some platform files have show/hideMouse functions implemented already.
Attachments
bzcursor.txt
show or hide the mouse cursor
(3.66 KiB) Downloaded 215 times
vdemin
Private
Private
Posts: 1
Joined: Sat Aug 22, 2015 6:52 pm

Re: Disabling the cursor?

Post by vdemin »

Thanks, anomaly!

Your patch is still working. I adapted it for the current 2.4.2 version.
Attachments

[The extension patch has been deactivated and can no longer be displayed.]

anomaly
Private First Class
Private First Class
Posts: 220
Joined: Tue Jul 26, 2005 10:32 pm
Location: Gainesville Florida

Re: Disabling the cursor?

Post by anomaly »

Glad the patch was of some use. I still have my 2.4.2 patched as well.
Post Reply