Jump to content
XCOMUFO & Xenocide

Input Events When The Game Has No Focus


Recommended Posts

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

Link to comment
Share on other sites

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
Link to comment
Share on other sites

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!

Link to comment
Share on other sites

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 ([email protected]), I'll review it and if it's OK, add it to the source.

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...