The open source OpenXR runtime
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

u/var: Make button downable

Part-of: <https://gitlab.freedesktop.org/monado/monado/-/merge_requests/2619>

authored by

Jakob Bornecrantz and committed by
Marge Bot
586af787 325bcbe6

+14
+7
src/xrt/auxiliary/util/u_var.h
··· 83 83 //! Pointer that will be passed to the function as its only argument 84 84 void *ptr; 85 85 86 + /*! 87 + * Is the pointer pressing down on the button curruently, this is not 88 + * edge triggered like the callback. For a mouse this means that the 89 + * pointer is hovering the button and the left is held down. 90 + */ 91 + xrt_atomic_s32_t downed; 92 + 86 93 //! Button text, use var `name` if zeroed 87 94 char label[64]; 88 95
+7
src/xrt/state_trackers/gui/gui_scene_debug.c
··· 521 521 igPopItemFlag(); 522 522 igPopStyleVar(1); 523 523 } 524 + 525 + // Checking for downed. 526 + if (disabled) { 527 + btn->downed = false; 528 + } else { 529 + btn->downed = igIsItemHovered(ImGuiHoveredFlags_RectOnly) && igIsMouseDown_Nil(ImGuiMouseButton_Left); 530 + } 524 531 } 525 532 526 533 static void