Input events

edited August 2010 in Help request
I just upgraded to orx 1.2 and I saw that the mouse and keyboard events have been removed. At first I thought that they had been merged into the input event, but I only receive those events when an input is defined in the config. Is this intentional?

Comments

  • edited August 2010
    Hi!

    Yes, joystick/keyboard/mouse events weren't handled consistently amongst the different flavours of the plugins and I thought they were not necessary as they can be queried with direct calls (orxKeyboard_IsKeyPressed(), etc...) or better, through the generic input module.

    They have to be defined there either in the config file or in code with orxInput_Bind*() functions. They can be changed on the fly, of course, and you can create inputs than don't necessarily map to physical device by using the orxINPUT_TYPE_EXTERNAL value of the enum.

    I find this very handy as I group everything through the generic input system and can bind them to whatever I want: physical device, GUI "buttons" by activating the input using orxInput_SetValue(), etc... This way, when going from one peripheral to the other, or when going to another platform, only the bindings need to be changed, the processing code itself doesn't change.

    If you still think you need the device input events back, I'll add them again, but it might take a bit as I have to updated all the plugins (~12 total).

    Let me know what you think!
  • edited August 2010
    It's nothing I'm dependent on. It just confused me a bit when I started up the game, and only half of the keys and buttons worked :).
  • edited August 2010
    Oh, good then! :)
Sign In or Register to comment.