MCPcopy Create free account
hub / github.com/defold/defold / GetMouseButtonValue

Function GetMouseButtonValue

engine/hid/src/hid.cpp:514–528  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

512 }
513
514 int GetMouseButtonValue(MouseButton button)
515 {
516 static int translation_table[] = {
517 dmPlatform::PLATFORM_MOUSE_BUTTON_LEFT,
518 dmPlatform::PLATFORM_MOUSE_BUTTON_RIGHT,
519 dmPlatform::PLATFORM_MOUSE_BUTTON_MIDDLE,
520 dmPlatform::PLATFORM_MOUSE_BUTTON_4,
521 dmPlatform::PLATFORM_MOUSE_BUTTON_5,
522 dmPlatform::PLATFORM_MOUSE_BUTTON_6,
523 dmPlatform::PLATFORM_MOUSE_BUTTON_7,
524 dmPlatform::PLATFORM_MOUSE_BUTTON_8,
525 };
526 assert((int) button < DM_ARRAY_SIZE(translation_table));
527 return translation_table[(int) button];
528 }
529
530 void ShowKeyboard(HContext context, KeyboardType type, bool autoclose)
531 {

Callers 2

TEST_FFunction · 0.85
UpdateFunction · 0.85

Calls 1

assertFunction · 0.50

Tested by 1

TEST_FFunction · 0.68