KeyStatus.cpp 997 B

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647
  1. /*
  2. * author: Patrick-Christopher Mattulat
  3. * e-mail: webmaster@lynarstudios.com
  4. */
  5. #include <input/KeyStatus.hpp>
  6. using ls::atlantis::glossary::KeyboardKeys;
  7. using ls::atlantis::input::KeyStatus;
  8. KeyStatus::KeyStatus() : KeyStatus(KeyboardKeys::NONE_SELECTED, false, false)
  9. {}
  10. KeyStatus::KeyStatus(const KeyboardKeys &_key, const bool _isFreedValue, const bool _isPressedValue) : key(_key), isFreedValue(_isFreedValue), isPressedValue(_isPressedValue)
  11. {}
  12. KeyStatus::~KeyStatus() = default;
  13. KeyboardKeys KeyStatus::getKey() const
  14. {
  15. return this->key;
  16. }
  17. bool KeyStatus::getIsFreedValue() const
  18. {
  19. return this->isFreedValue;
  20. }
  21. bool KeyStatus::getIsPressedValue() const
  22. {
  23. return this->isPressedValue;
  24. }
  25. void KeyStatus::setIsFreedValue(const bool _isFreedValue)
  26. {
  27. this->isFreedValue = _isFreedValue;
  28. }
  29. void KeyStatus::setIsPressedValue(const bool _isPressedValue)
  30. {
  31. this->isPressedValue = _isPressedValue;
  32. }
  33. void KeyStatus::setKey(const KeyboardKeys &_key)
  34. {
  35. this->key = _key;
  36. }