Monkey
Store
Community
Apps
Contact
Login or Signup

Trying to access input via externs

Monkey Programming Forums/XNA/Trying to access input via externs

therevills(Posted 1+ years ago) #1
Im trying to get access to the input variable in mojo.xna.cs, but having a hard time.

This doesnt work:

for( int i=0;i<512;++i ){
    gxtkApp.input.keyStates[i]&=0x100;
}


If I "hack" the mojo.xna.cs and make public gxtkInput input; to be public static gxtkInput input; it works... but I dont want to do this... is there another way?

https://code.google.com/p/diddy/source/browse/trunk/src/diddy/native/diddy.xna.cs


therevills(Posted 1+ years ago) #2
Would this work?

gxtkApp.game.app.input.keyStates[i]&=0x100;


Ill try it tonight...


dopeyrulz(Posted 1+ years ago) #3
therevills,

Yes - that does work.


Rushino(Posted 4 months ago) #4
What does this do?