Jump to content


Photo

Input Events When The Game Has No Focus


  • Please log in to reply
4 replies to this topic

#1 rversaw

rversaw

    Squaddie

  • Xenocide Recruit
  • 7 posts

Posted 13 September 2008 - 10:44 PM

First of all, I'm new here, so hello everyone! I'm a C# developer with a love for X-COM and would love to give a hand. As I'm new, and the large quantity of forums is overwhelming, I'm sorry if this is not the proper place for this.

When I was doing a little debugging in the Battlescape I noticed that it picked up any clicks that were made in VS (or anything else) even when the game wasn't active. I would guess this isn't the intended functionality, so I added a quick check to take care of this.

GuiManager.cs (around line 77)
if (Game.IsActive)
	  {
		  CeGui.Renderers.Xna.Source.InputInjector.processMouseInput();
		  CeGui.Renderers.Xna.Source.InputInjector.processKeyboardInput(gameTime);
	  }

This shouldn't negatively affect anything, and (in my opinion) should be included.

Are the recruitment procedures I saw listed somewhere still current? I was uncertain, so I thought posting this somewhere might have been the better approach. Please give me any guidance that may be necessary! In the mean time, I'll be looking into a few more fixes.

Ryan

#2 rversaw

rversaw

    Squaddie

  • Xenocide Recruit
  • 7 posts

Posted 14 September 2008 - 12:27 AM

Completely unrelated, but I just implemented a few methods in the Equip Soldier Screen (Battlescape). Items can now be dropped to the ground and picked back up. If an item is on the ground, another soldier can also go grab it.

Currently if you close the screen while holding an item, it is dropped to the ground. Should it instead be replaced where it came from? If I grab a gun from a soldier's hand then close the window, I would expect it to return there if I never placed it.

Edited by rversaw, 14 September 2008 - 12:31 AM.


#3 kafros

kafros

    Creative Text Department

  • Xenocide Creative-Text Departmen
  • 1,800 posts

Posted 14 September 2008 - 06:07 AM

First of all, I'm new here, so hello everyone! I'm a C# developer with a love for X-COM and would love to give a hand. As I'm new, and the large quantity of forums is overwhelming, I'm sorry if this is not the proper place for this.

No worries :), it's fine due to the forum member privileges you have. Ask Stewart or dteviot (I'm not sure if the latter has the ability to promote your status) in order to get recruit membership and be able to check the dev-parts of the forum here

When I was doing a little debugging in the Battlescape I noticed that it picked up any clicks that were made in VS (or anything else) even when the game wasn't active. I would guess this isn't the intended functionality, so I added a quick check to take care of this.

GuiManager.cs (around line 77)

if (Game.IsActive)
	  {
		  CeGui.Renderers.Xna.Source.InputInjector.processMouseInput();
		  CeGui.Renderers.Xna.Source.InputInjector.processKeyboardInput(gameTime);
	  }

This shouldn't negatively affect anything, and (in my opinion) should be included.

Indeed it works. There was a talk on this matter at the early dev stages, IIRC it wasn't corrected because the game is supposed to run in fullscreen, so you wouldn't have a problem anyway. It runs in windowed mode just to make life easier.

Are the recruitment procedures I saw listed somewhere still current? I was uncertain, so I thought posting this somewhere might have been the better approach. Please give me any guidance that may be necessary! In the mean time, I'll be looking into a few more fixes.

Don't worry about that now :), just check the existing code and see if you enjoy working on it. In addition, you can ask for recruit status as I mentioned earlier, so you'll be able to work more freely.


Completely unrelated, but I just implemented a few methods in the Equip Soldier Screen (Battlescape). Items can now be dropped to the ground and picked back up. If an item is on the ground, another soldier can also go grab it.

Currently if you close the screen while holding an item, it is dropped to the ground. Should it instead be replaced where it came from? If I grab a gun from a soldier's hand then close the window, I would expect it to return there if I never placed it.

Fine changes! :)


In addition, the developer of the XNA branch (the active one for the last 2 years or so) is dteviot. I guess you could also talk to StaffSergeant and I'm sure they'll be happy to assist you any way they can. Mad and me will also try to help you, although we are not programmers :)

Enjoy your stay!

#4 dteviot

dteviot

    Programming Department

  • [Xenocide Senior Members]
  • 1,479 posts

Posted 14 September 2008 - 01:41 PM

Completely unrelated, but I just implemented a few methods in the Equip Soldier Screen (Battlescape). Items can now be dropped to the ground and picked back up. If an item is on the ground, another soldier can also go grab it.

Currently if you close the screen while holding an item, it is dropped to the ground. Should it instead be replaced where it came from? If I grab a gun from a soldier's hand then close the window, I would expect it to return there if I never placed it.

Hi rversaw,
Welcome, nice to have another developer.

To get recruit status, you need to send a PM to RedKnight, who will send you the appropriate consent form. As RK hasn't been seen a lot lately, I'd also send a PM to stewart.
Also, if you e-mail me your patch file (dteviot@projectxenocide.com), I'll review it and if it's OK, add it to the source.
Saving the world from the scum of the universe is hard work. Especially when you have to create the scum to begin with.

#5 kafros

kafros

    Creative Text Department

  • Xenocide Creative-Text Departmen
  • 1,800 posts

Posted 19 September 2008 - 02:58 PM

Patch integrated!