BsGUIButtonEvent.cpp 794 B

123456789101112131415161718192021222324252627282930313233343536373839
  1. #include "BsGUIButtonEvent.h"
  2. using namespace CamelotFramework;
  3. namespace BansheeEngine
  4. {
  5. GUIKeyEvent::GUIKeyEvent()
  6. :mType(GUIKeyEventType::KeyDown), mKey(BC_0), mShift(false), mCtrl(false), mAlt(false)
  7. {
  8. }
  9. GUIKeyEvent::GUIKeyEvent(bool shift, bool ctrl, bool alt)
  10. :mType(GUIKeyEventType::KeyDown), mKey(BC_0), mShift(shift), mCtrl(ctrl), mAlt(alt)
  11. {
  12. }
  13. void GUIKeyEvent::setKeyDownData(ButtonCode key)
  14. {
  15. mType = GUIKeyEventType::KeyDown;
  16. mKey = key;
  17. mInputChar = 0;
  18. }
  19. void GUIKeyEvent::setKeyUpData(ButtonCode key)
  20. {
  21. mType = GUIKeyEventType::KeyUp;
  22. mKey = key;
  23. mInputChar = 0;
  24. }
  25. void GUIKeyEvent::setTextInputData(UINT32 inputChar)
  26. {
  27. mType = GUIKeyEventType::TextInput;
  28. mKey = BC_0;
  29. mInputChar = inputChar;
  30. }
  31. }