Tatooine
gl
include
tatooine
gl
glfw
buttons.h
Go to the documentation of this file.
1
#ifndef TATOOINE_GL_GLFW_BUTTONS_H
2
#define TATOOINE_GL_GLFW_BUTTONS_H
3
//==============================================================================
4
#include <
tatooine/gl/glincludes.h
>
5
#include <
tatooine/gl/mouse.h
>
6
//==============================================================================
7
namespace
tatooine::gl::glfw
{
8
//==============================================================================
9
inline
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
glincludes.h
mouse.h
tatooine::gl::glfw
Definition:
api.h:8
tatooine::gl::glfw::convert_button
auto convert_button(int const button)
Definition:
buttons.h:9
tatooine::gl::button
button
Definition:
mouse.h:8
tatooine::gl::button::middle
@ middle
tatooine::gl::button::right
@ right
tatooine::gl::button::left
@ left
tatooine::gl::button::unknown
@ unknown
Generated by
1.9.5