Event.h 758 B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354
  1. #ifndef EVENT_H
  2. #define EVENT_H
  3. // add this include because this is only common file between everything that uses Input fucntion
  4. #include <OIS.h>
  5. enum EventType
  6. {
  7. ET_NULL = 0,
  8. ET_KEY_PRESS,
  9. ET_KEY_REPEAT,
  10. ET_KEY_IMPULSE,
  11. ET_KEY_RELEASE,
  12. ET_MOUSE_PRESS,
  13. ET_MOUSE_RELEASE,
  14. ET_MOUSE_MOVE,
  15. ET_MOUSE_SCROLL
  16. };
  17. struct Event
  18. {
  19. Event():
  20. type( ET_NULL ),
  21. param1( 0 ),
  22. param2( 0 )
  23. {
  24. };
  25. Event( EventType n ):
  26. type( n ),
  27. param1( 0 ),
  28. param2( 0 )
  29. {
  30. };
  31. Event( EventType n, float p1, float p2 ):
  32. type( n ),
  33. param1( p1 ),
  34. param2( p2 )
  35. {
  36. };
  37. EventType type;
  38. float param1;
  39. float param2;
  40. };
  41. #endif // EVENT_H