SourceClass Sense
from egui import Senseclass Sense:Methods§
Source@staticmethod
def click() -> Sense§
Sense clicks and hover, but not drags, and make the widget focusable.
Use Sense.CLICK if you don't want the widget to be focusable.
Source@staticmethod
def click_and_drag() -> Sense§
Sense both clicks, drags and hover (e.g. a slider or window), and make the widget focusable.
Note that this will introduce a latency when dragging, because when the user starts a press egui can't know if this is the start of a click or a drag, and it won't know until the cursor has either moved a certain distance, or the user has released the mouse button.
See egui.PointerState.is_decidedly_dragging for details.
Source@staticmethod
def drag() -> Sense§
Sense drags and hover, but not clicks. Make the widget focusable.
Use Sense.DRAG if you don't want the widget to be focusable
Source@staticmethod
def focusable_noninteractive() -> Sense§
Senses no clicks or drags, but can be focused with the keyboard. Used for labels that can be focused for the benefit of screen readers.
Source@staticmethod
def hover() -> Sense§
Senses no clicks or drags. Only senses mouse hover.
Sourcedef interactive(self, /) -> bool§
Returns true if we sense either clicks or drags.