Class Popover
A popup usually anchored to another UI element.
Inherited Members
Namespace: UnityEngine.Dt.App.UI
Syntax
public sealed class Popover : AnchorPopup<Popover>
Properties
modalBackdrop
Enable or disable the blocking of outside click events.
Declaration
public bool modalBackdrop { get; set; }
Property Value
Type | Description |
---|---|
Boolean |
Methods
Build(VisualElement, VisualElement)
Build a new Popover instance.
Declaration
public static Popover Build(VisualElement referenceView, VisualElement contentView)
Parameters
Type | Name | Description |
---|---|---|
VisualElement | referenceView | An arbitrary UI element in the current panel. |
VisualElement | contentView | The content that will appear inside this popup. |
Returns
Type | Description |
---|---|
Popover | The Popover instance. |
GetFocusableElement()
Returns the element that will be focused when the view will become visible.
The default value is null
.
Declaration
protected override VisualElement GetFocusableElement()
Returns
Type | Description |
---|---|
VisualElement | The element that will be focused when the view will become visible. |
Overrides
GetMovableElement()
Method which must return the visual element that needs to be moved, based on the anchor position and size.
Declaration
protected override VisualElement GetMovableElement()
Returns
Type | Description |
---|---|
VisualElement | The visual element which will be moved. The default value is view. |
Overrides
InvokeDismissedEventHandlers(DismissType)
Called when the popup has been dismissed. This method will invoke any handlers attached to the dismissed event.
Declaration
protected override void InvokeDismissedEventHandlers(DismissType reason)
Parameters
Type | Name | Description |
---|---|---|
DismissType | reason |
Overrides
SetModalBackdrop(Boolean)
Enable or disable the blocking of outside click events.
Declaration
public Popover SetModalBackdrop(bool enableModalBackdrop)
Parameters
Type | Name | Description |
---|---|---|
Boolean | enableModalBackdrop | Whether to enable the blocking of outside click events. |
Returns
Type | Description |
---|---|
Popover | The Popover instance. |
ShouldAnimate()
Implement this method to know if the popup should call AnimateViewIn() and AnimateViewOut(DismissType) methods or not.
Declaration
protected override bool ShouldAnimate()
Returns
Type | Description |
---|---|
Boolean |
|