Page 1 of 1

Don't allow cursor move outer window borders during the game

Posted: Fri Sep 25, 2009 3:03 pm
by slogic
In windowed mode don't allow cursor move outer window borders during the game. When a player pressed <Esc> key and dialog popuped then restriction could be removed. This will help players to avoid shouting at the top of one's voice during the battle.

Re: Don't allow cursor move outer window borders during the game

Posted: Fri Sep 25, 2009 5:44 pm
by Balthazar
Windowed mode is mostly for debug purposes, so locking mouse is not the point rignt now. Mouse fixing can be add as option later.

Re: Don't allow cursor move outer window borders during the game

Posted: Fri Sep 25, 2009 6:26 pm
by milipili
I would find it really annoying. If possible, why not for an option.

Re: Don't allow cursor move outer window borders during the game

Posted: Fri Sep 25, 2009 8:08 pm
by slogic
Balthazar wrote:Windowed mode is mostly for debug purposes, so locking mouse is not the point rignt now. Mouse fixing can be add as option later.
LOL, because this is my lovely mode cause i can combine it with my job, icq consulting & just controlling what happens else on the desktop :)
Also i've read the same request made by some guy on your russian forum. So, there are two of us :D

milipili , what exaclty is annoying? If my request would be implemented or current state? If the former, i can't imagine how this can be ever comfortable without it.

Re: Don't allow cursor move outer window borders during the game

Posted: Fri Sep 25, 2009 8:49 pm
by milipili
It would be annoying for me to lock the mouse because I use the windowed mode when coding in TA3D. Event without talking about developing, I've got several displays and the fullscreen mode of TA3D is simply not good enough (like nearly all other 3D apps on OS X actually....)
Instead of locking, I would prefer that the app does not continue to handle mouse events when the cursor is outside the window, but this is not quite easy to do.

Re: Don't allow cursor move outer window borders during the game

Posted: Sat Sep 26, 2009 8:07 am
by Balthazar
milipili - the most quick way to solve this is to add option for locking/unlocking mouse. It can be done even throught TA3D console, without need of adding more lines in the option menu.

Re: Don't allow cursor move outer window borders during the game

Posted: Sun Sep 27, 2009 10:25 am
by zuzuf
it has been implemented in 0.6 for a while now :P , you can enable/disable input grabbing from the options menu or with a console command :
  • enable grab_inputs
  • disable grab_inputs
beware that in grabbed mode mouse sensitivity may not be the same as in ungrabbed mode.

Re: Don't allow cursor move outer window borders during the game

Posted: Sun Sep 27, 2009 4:48 pm
by slogic
thanks! by the way, i recalled how this feature is officially called: clip mouse cursor in a window. :)

Re: Don't allow cursor move outer window borders during the game

Posted: Sun Sep 27, 2009 6:51 pm
by milipili
Oo I did not know ....
is there a list of all available commands somewhere ?

Re: Don't allow cursor move outer window borders during the game

Posted: Mon Sep 28, 2009 7:29 am
by zuzuf
somewhere in wiki and/or doc but it's not up to date. For the whole list of commands in 0.6 the only reference is the file in source code that handle them ...

Re: Don't allow cursor move outer window borders during the game

Posted: Mon Sep 28, 2009 9:59 am
by milipili
Ah... This one... :p
I think that some code refactoring would be a good thing... I will take a glance at this.

Re: Don't allow cursor move outer window borders during the game

Posted: Sat Jan 09, 2010 8:59 pm
by slogic
Well, i have to admit you made not exactly what i meant. I told about clipping mouse input during gameplay only. The main & the only positive moment in clipping mouse is to avoid suddenly clicking with a mouse outside of a main window & loosing a focus. And i specifically told that when i press <Escape> key you may (i actually want) disable mouse clipping, because usually in this mode a want to make a break, move/minimize window etc. So, in start menu there is also no need to clip mouse in a window. If you like to clip mouse statically for the hole app run you may introduce three-way switcher?

I very hope you share my thoughts. Just try to play in windowed mode any hot game.

Re: Don't allow cursor move outer window borders during the game

Posted: Sat Jan 09, 2010 9:52 pm
by zuzuf
i wonder why I didn't do it earlier since I run TA3D in windowed mode when I need to test my modifications :mrgreen: . Now it's done :P

Re: Don't allow cursor move outer window borders during the game

Posted: Sun Jan 10, 2010 6:44 pm
by xpoy
/:^]
Agreement, some time TA3D lock mouse in a little space.
And, When load a game, couldn't exchange to another app....

Re: Don't allow cursor move outer window borders during the game

Posted: Mon Jan 11, 2010 12:00 am
by milipili
And, When load a game, couldn't exchange to another app....
I planned to use a thread pool for that, instead of blocking the main thread (which is responsible for managing system events). It is already ready in libyuni but I would like to make more checks before. (Yuni::Job::QueueService for devs interested in it)

Re: Don't allow cursor move outer window borders during the game

Posted: Wed Jan 13, 2010 8:29 am
by xpoy
Greeting!
/:^]

And, maybe a special thread for mouse/keyboard?

Re: Don't allow cursor move outer window borders during the game

Posted: Sun Feb 07, 2010 11:28 am
by D.Durand
Here too, i often play in windowed mode (under Linux). Today, games often use less ressources than in full screen, and since the "menu" or "windows" key are often overrided by games, i not always can Tab between apps if one is a full screen game.