Author Topic: Is it possible to 'lock' the mouse in window mode?  (Read 949 times)  Share 

Hollister Man

  • Mmmm...tingly...
    • I can help with backgrounds
    •  
    • I can help with proof reading
    •  
    • I can help with web design
    •  
I have been playing with DOSBox lately and wondered how hard it would be to 'lock' the cursor to the AGS game window when playing in window mode?  I have a heck of a time when clicking near the edges of the screen, making sure the cursor lands inside.

I hate to be a part of the glut of suggestions lately, but this is a constantly annoying little tiddlywink.  If its a pain, ignore me. :)
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Gregjazz

    • I can help with AGS tutoring
    •  
    • I can help with proof reading
    •  
    • I can help with scripting
    •  
    • I can help with voice acting
    •  
  • Gregjazz worked on a game that was nominated for an AGS Award!Gregjazz worked on a game that won an AGS Award!
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #1 on: 16 Jun 2004, 03:09 »
That little SetMouseBounds thing or whatever won't work, correct? Because you're trying to use it in the windowed mode rather than fullscreen.

I do not know of any other program that is in a window that locks your cursor like that.

Iceboty V7000a

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #2 on: 16 Jun 2004, 03:16 »
That's not possible at the moment I think, and if someone played a game under window mode they usually had a reason to, like for example wanted to execute some other programmes alongside the AGS game, so I don't think locking the cursor to one window is a very good idea.

However I know how frustrating that in many AGS games, sometimes you need to click really close to screen edges, which was quite hard in gereral if you play them under window mode. So I think it's the responsibility for those who are making the games to make sure that you won't need to click really close to edges, actually they should have tried it when testing their game.

Hollister Man

  • Mmmm...tingly...
    • I can help with backgrounds
    •  
    • I can help with proof reading
    •  
    • I can help with web design
    •  
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #3 on: 16 Jun 2004, 03:42 »
Actually in DOSBox, it takes an alt-tab to get out, I think that's it.  I run in a window because my monitor throws the screen way off to the side in 640 mode. :)
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Iceboty V7000a

  • Local Moderator
  • * KILL* * KILL * * KILL *
    • Lifetime Achievement Award Winner
    •  
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #4 on: 16 Jun 2004, 03:52 »
I run in a window because my monitor throws the screen way off to the side in 640 mode. :)
Could you just adjust your monitor's setting for it?

TerranRich

  • The Mystery Begins WHENEVER, Okay? ;)
    • I can help with characters
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
  • TerranRich worked on a game that was nominated for an AGS Award!
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #5 on: 16 Jun 2004, 04:23 »
Someone could make a program in VB or some such language that restricted the mouse coordinates and would stay running in the background while the game ran. It could constantly detect the game's window coordinates and dimensions and adjust the mouse bounds accordingly. If I only knew more Visual Basic API language. :P

Hollister Man

  • Mmmm...tingly...
    • I can help with backgrounds
    •  
    • I can help with proof reading
    •  
    • I can help with web design
    •  
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #6 on: 16 Jun 2004, 04:55 »
Gil:  Its so far off the side that it actually becomes time-consuming to adjust it every time I test the game (everything from the tray over is placed off the screen when I switch back, if 640 is reasonably centered, crappola monitor {maxtech, it even has 1 pixel that doesn't work at all.})  I just need a new one :)
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #7 on: 16 Jun 2004, 21:28 »
Interesting idea -- I guess it could be added as an option to the Setup program. Would anyone else find this useful though?

TerranRich

  • The Mystery Begins WHENEVER, Okay? ;)
    • I can help with characters
    •  
    • I can help with proof reading
    •  
    • I can help with story design
    •  
    • I can help with translating
    •  
    • I can help with voice acting
    •  
    • I can help with web design
    •  
  • TerranRich worked on a game that was nominated for an AGS Award!
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #8 on: 16 Jun 2004, 23:07 »
Yes! I definitely would. So would anyone running 1600x1024 like me and running a hi-res game in windowed mode.

Radiant

  • Mittens Knight
  • AGS Baker
  • ...and we are the Dreamers of Dreams.
  • Radiant worked on a game that was nominated for an AGS Award!Radiant worked on a game that won an AGS Award!
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #9 on: 17 Jun 2004, 11:37 »
Maybe an easier solution would be this: if AGS runs in windowed mode with a 320x200 screen, instead the interpreter could create a 420x300 screen and center the actual graphics in there. So you'll have all the edge you want.

Ryukage

  • REAL ULTIMATE POWER
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #10 on: 19 Jun 2004, 00:04 »
Maybe an easier solution would be this: if AGS runs in windowed mode with a 320x200 screen, instead the interpreter could create a 420x300 screen and center the actual graphics in there. So you'll have all the edge you want.


Yes, adding a margin around the game window, and then translating clicks in the margin to the nearest actual screen coordinate, seems like a better idea than restricting the mouse.  Probably more complicated to implement, but I for one would be really freaking annoyed, and I mean tear-the-cd-out-of-the-drive-and-throw-it-against-the-wall annoyed, if I encountered a program that confined the system mouse to it's own window, even it was just a default setting that could be turned off.
Ninja Master Ryukage
"Flipping out and kicking off heads since 1996"

Hollister Man

  • Mmmm...tingly...
    • I can help with backgrounds
    •  
    • I can help with proof reading
    •  
    • I can help with web design
    •  
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #11 on: 19 Jun 2004, 03:35 »
Strangely, I didn't find it annoying at all, of course, I 'alt-tab' a lot, so I hardly noticed.
That's like looking through a microscope at a bacterial culture and seeing a THOUSAND DANCING HAMSTERS!

Your whole planet is gonna blow up!  Your whole DAMN planet...

Pumaman

  • Creator of AGS
  • Administrator
  • Mittens TRAITOR
  • I sense danger.
    • Lifetime Achievement Award Winner
    •  
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #12 on: 19 Jun 2004, 21:48 »
Adding some sort of border sounds reasonable to me -- it could probably be off by default, but optionally enabled in Setup.

Ishmael

  • I put AGS on my CV.
    • I can help with translating
    •  
Re: Is it possible to 'lock' the mouse in window mode?
« Reply #13 on: 19 Aug 2004, 14:52 »
Do make it script controlable also, somehow, atleast I like to provide the players with as much custimazation options for the game as possible.
I used to make games but then I took an IRC in the knee.

<Calin> Ishmael looks awesome all the time
|