Jump to content

Input Events


Recommended Posts

Alright, so I'm trying to figure out where the input events are in the source code. If this project were in java, it would have event listeners to perform an action upon a mouse click or key press, but I can't find anything even remotely along those lines. Where is the code for input events and the resulting actions located?

Link to comment
Share on other sites

I think you would probably want to look at binaries/data/mods/public/gui/session/input.js. Some other files in those folders might be relevant as well. You will find that these often call simulation components, http://trac.wildfiregames.com/wiki/SimulationArchitecture gives an overview of the simulation system. The js parts are in /home/jonathan/programming/0ad/binaries/data/mods/public/simulation the components folder contains the simulation components and the helpers folder has some stuff which they use, commands.js is an important file since it handles commands sent to entities. The C++ components are found in source/simulation2.

There is a lack of high level documentation for the game unfortunately, hopefully this will help you a bit.

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...