MCPcopy Create free account
hub / github.com/diasurgical/devilution / HandleMouseEventButton

Function HandleMouseEventButton

SourceX/DiabloUI/button.cpp:33–47  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

31}
32
33bool HandleMouseEventButton(const SDL_Event &event, UiButton *button)
34{
35 if (event.button.button != SDL_BUTTON_LEFT)
36 return false;
37 switch (event.type) {
38 case SDL_MOUSEBUTTONUP:
39 button->action();
40 return true;
41 case SDL_MOUSEBUTTONDOWN:
42 button->pressed = true;
43 return true;
44 default:
45 return false;
46 }
47}
48
49void HandleGlobalMouseUpButton(UiButton *button)
50{

Callers 1

HandleMouseEventFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected