MCPcopy Create free account
hub / github.com/Panzerschrek/Chasm-Reverse / TranslateMouseButton

Function TranslateMouseButton

PanzerChasm/system_window.cpp:68–79  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

66}
67
68static SystemEvent::MouseKeyEvent::Button TranslateMouseButton( const Uint8 button )
69{
70 using Button= SystemEvent::MouseKeyEvent::Button;
71 switch(button)
72 {
73 case SDL_BUTTON_LEFT: return Button::Left;
74 case SDL_BUTTON_RIGHT: return Button::Right;
75 case SDL_BUTTON_MIDDLE: return Button::Middle;
76 };
77
78 return Button::Unknown;
79}
80
81static SystemEvent::KeyEvent::ModifiersMask TranslateKeyModifiers( const Uint16 modifiers )
82{

Callers 2

GetInputMethod · 0.85
GetInputStateMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected