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

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share

×
×
  • Create New...