Rizzen

I've successfully compiled the RocketCommanderXNA. However, when I run it I cannot click on any menu items. My mouse is moving around the screen but nothing I do allows it to work. I've looked at the source and it looks as if there are hot keys, but those do not work either.

Also, whenever I attempt to debug and step through the code, it pukes on a renderTarget line and I can't debug in that fashion.

Anyone have any idea whats going on and can point me in the proper direction

Thanks!


Re: XNA Game Studio Express RocketCommanderXNA Mouse Issue

Darkside

I also found this, the reason is that there is no mouse "Click" logic on the main menu screen. "\GameScreens\MainMenu.cs"

As a save there are hot-key's set up for the menu "// Hotkeys, M=Mission, H=Highscores, C=Credits, Esc=Quit"

You can code the mouse click yourself as the hover logic is there, just add OR logic to the hot key's code.

Rgds

Darkside






Re: XNA Game Studio Express RocketCommanderXNA Mouse Issue

abi

Well, the "click" logic is handled inside the RenderButton methods of the RocketCommanderGame class.


// Play click sound if button was just clicked
bool ret =
(Input.MouseLeftButtonJustPressed ||
Input.GamePadAJustPressed) &&
this.IsActive &&
highlight;
[...]
if (ret == true)
Sound.Play(Sound.Sounds.Click);

// Return true if button was pressed, false otherwise
return ret;


I would put a breakpoint here and try to debug why MouseLeftButtonJustPressed is not getting true if you click a button. Maybe for some reason IsActive is not true and for that reason clicking does not work Could be that I added the code to prevent clicking in windowed mode when the window is not active and somewhere in the background .. dunno anymore ^^

But RocketCommanderXNA should work with mouse+keyboard or gamepad input on the PC (and gamepad only on the xbox360 since there is no mouse support in XNA on the Xbox 360, keyboard input works too on the xbox360, just plug in any usb keyboard ^^).





Re: XNA Game Studio Express RocketCommanderXNA Mouse Issue

Drakhain

Yep i've got the same problem. I cannot click and the keyboard's shortcut aren't working to. Their logic's code seem ok so i'm stuck;




Re: XNA Game Studio Express RocketCommanderXNA Mouse Issue

Rizzen

Interesting, I made some suggested changes to the code and got it working but to interesting results.

First the command MouseLeftButtonJustPressed is not recognized on my machine. In other words this code didn't work on my machine:

if (Input.MouseInBox(clickArea) &&
quit == false &&
(Input.MouseLeftButtonJustPressed ||
Input.GamePadAJustPressed ||
Input.GamePadStartPressed))

So I had to change my code to be MouseLeftButtonPressed. Why would that be the case I'm even using a Microsoft Optical Mouse.

Now, once I'm in the game after changing all the menu code to get it to work, the game kind of freaks out. My ship ramps up to like mach six and I'm out of fuel in about 4 seconds and cannot slow down. I can strafe and move the mouse, but cannot slow down.

I'm running Microsoft XP Pro... Nividia GeForce 6800, Microsoft Mouse & Keyboard. Perhaps its my AMD processor

Any ideas Weird. Anyone else having these issues




Re: XNA Game Studio Express RocketCommanderXNA Mouse Issue

Drakhain

I can use my mouse and keyboard only when playing with the debug compiled version.