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

You think of something which could be added to TA3D post here! /
Vous pensez à quelque chose que l'on pourrait ajouter à TA3D, postez ici!
Post Reply
slogic
Posts: 75
Joined: Wed Mar 26, 2008 5:23 pm
Location: RF, Bryansk
Contact:

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

Post by slogic » Fri Sep 25, 2009 3:03 pm

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.

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

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

Post by Balthazar » Fri Sep 25, 2009 5:44 pm

Windowed mode is mostly for debug purposes, so locking mouse is not the point rignt now. Mouse fixing can be add as option later.

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

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

Post by milipili » Fri Sep 25, 2009 6:26 pm

I would find it really annoying. If possible, why not for an option.
Damien Gerard
Ta3d & Yuni Developer

slogic
Posts: 75
Joined: Wed Mar 26, 2008 5:23 pm
Location: RF, Bryansk
Contact:

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

Post by slogic » Fri Sep 25, 2009 8:08 pm

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.

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

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

Post by milipili » Fri Sep 25, 2009 8:49 pm

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.
Damien Gerard
Ta3d & Yuni Developer

User avatar
Balthazar
Moderator
Posts: 2055
Joined: Wed Nov 01, 2006 4:31 pm
Location: Russian Federation
Contact:

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

Post by Balthazar » Sat Sep 26, 2009 8:07 am

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.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

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

Post by zuzuf » Sun Sep 27, 2009 10:25 am

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.
=>;-D Penguin Powered

slogic
Posts: 75
Joined: Wed Mar 26, 2008 5:23 pm
Location: RF, Bryansk
Contact:

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

Post by slogic » Sun Sep 27, 2009 4:48 pm

thanks! by the way, i recalled how this feature is officially called: clip mouse cursor in a window. :)

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

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

Post by milipili » Sun Sep 27, 2009 6:51 pm

Oo I did not know ....
is there a list of all available commands somewhere ?
Damien Gerard
Ta3d & Yuni Developer

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

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

Post by zuzuf » Mon Sep 28, 2009 7:29 am

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 ...
=>;-D Penguin Powered

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

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

Post by milipili » Mon Sep 28, 2009 9:59 am

Ah... This one... :p
I think that some code refactoring would be a good thing... I will take a glance at this.
Damien Gerard
Ta3d & Yuni Developer

slogic
Posts: 75
Joined: Wed Mar 26, 2008 5:23 pm
Location: RF, Bryansk
Contact:

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

Post by slogic » Sat Jan 09, 2010 8:59 pm

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.

User avatar
zuzuf
Administrateur - Site Admin
Posts: 3281
Joined: Mon Oct 30, 2006 8:49 pm
Location: Toulouse, France
Contact:

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

Post by zuzuf » Sat Jan 09, 2010 9:52 pm

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
=>;-D Penguin Powered

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

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

Post by xpoy » Sun Jan 10, 2010 6:44 pm

/:^]
Agreement, some time TA3D lock mouse in a little space.
And, When load a game, couldn't exchange to another app....

milipili
Posts: 545
Joined: Thu Nov 02, 2006 8:52 am
Location: Paris (France)
Contact:

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

Post by milipili » Mon Jan 11, 2010 12:00 am

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)
Damien Gerard
Ta3d & Yuni Developer

xpoy
Posts: 669
Joined: Mon Sep 22, 2008 3:55 am

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

Post by xpoy » Wed Jan 13, 2010 8:29 am

Greeting!
/:^]

And, maybe a special thread for mouse/keyboard?

D.Durand
Posts: 87
Joined: Sun Feb 07, 2010 11:21 am

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

Post by D.Durand » Sun Feb 07, 2010 11:28 am

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.

Post Reply

Who is online

Users browsing this forum: No registered users and 17 guests