MCPcopy Create free account
hub / github.com/Illation/ETEngine / GetButtonFromGtk

Method GetButtonFromGtk

Engine/source/EtEditor/Util/GtkUtil.cpp:21–31  ·  view source on GitHub ↗

--------------------------------- GtkUtil::GetButtonFromGtk Convert GTK mouse button codes to the input managers buttons

Source from the content-addressed store, hash-verified

19// Convert GTK mouse button codes to the input managers buttons
20//
21E_MouseButton GtkUtil::GetButtonFromGtk(uint32 const buttonCode)
22{
23 switch (buttonCode)
24 {
25 case 1: return E_MouseButton::Left;
26 case 2: return E_MouseButton::Center;
27 case 3: return E_MouseButton::Right;
28
29 default: return E_MouseButton::COUNT; // invalid button code
30 }
31}
32
33//---------------------------------
34// GtkUtil::GetButtonFromGtk

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected