Tatooine
buttons.h
Go to the documentation of this file.
1#ifndef TATOOINE_GL_GLFW_BUTTONS_H
2#define TATOOINE_GL_GLFW_BUTTONS_H
3//==============================================================================
5#include <tatooine/gl/mouse.h>
6//==============================================================================
7namespace tatooine::gl::glfw {
8//==============================================================================
9inline auto convert_button(int const button) {
10 switch (button) {
11 case GLFW_MOUSE_BUTTON_LEFT:
12 return button::left;
13 case GLFW_MOUSE_BUTTON_MIDDLE:
14 return button::middle;
15 case GLFW_MOUSE_BUTTON_RIGHT:
16 return button::right;
17 default:
18 return button::unknown;
19 }
20}
21//==============================================================================
22} // namespace tatooine::gl
23//==============================================================================
24#endif
25
Definition: api.h:8
auto convert_button(int const button)
Definition: buttons.h:9
button
Definition: mouse.h:8