Browse Source

Platform: well, these OTOH *don't* need to be flags.

pull/300/head
Vladimír Vondruš 7 years ago
parent
commit
73e0199696
  1. 2
      src/Magnum/Platform/EmscriptenApplication.cpp
  2. 13
      src/Magnum/Platform/EmscriptenApplication.h

2
src/Magnum/Platform/EmscriptenApplication.cpp

@ -530,7 +530,7 @@ void EmscriptenApplication::exit(int) {
}
EmscriptenApplication::MouseEvent::Button EmscriptenApplication::MouseEvent::button() const {
return Button(1 << _event->button);
return Button(_event->button);
}
Vector2i EmscriptenApplication::MouseEvent::position() const {

13
src/Magnum/Platform/EmscriptenApplication.h

@ -989,14 +989,9 @@ class EmscriptenApplication::MouseEvent: public EmscriptenApplication::InputEven
* @see @ref button()
*/
enum class Button: std::int32_t {
/** Left mouse button */
Left = 1 << 0,
/** Middle mouse button */
Middle = 1 << 1,
/** Right mouse button */
Right = 1 << 2
Left, /**< Left mouse button */
Middle, /**< Middle mouse button */
Right /**< Right mouse button */
};
/** @brief Button */
@ -1028,7 +1023,7 @@ class EmscriptenApplication::MouseMoveEvent: public EmscriptenApplication::Input
*
* @see @ref buttons()
*/
enum class Button: std::int32_t {
enum class Button: Int {
/** Left mouse button */
Left = 1 << 0,

Loading…
Cancel
Save