Api Sandbox UI Popup
class

Popup

public class Popup : BasePopup

Constructors

Popup()
Popup(Panel sourcePanel, PositionMode position, Single offset)

Properties

Name Type Description
PopupSource Panel Which panel triggered this popup. Set by Single) or the constructor.
SelectedChild Panel Currently selected option in the popup. Used internally for keyboard navigation.
Position PositionMode Positioning mode for this popup.
PopupSourceOffset Single Offset away from PopupSource based on Position.
CloseWhenParentIsHidden Boolean If true, will close this popup when the PopupSource is hidden.
Title String If set, will add an unselectable header with given text and Icon.
Icon String If set, will add an unselectable header with given icon and Title.

Methods

Void SetPositioning(Panel sourcePanel, PositionMode position, Single offset)

Sets PopupSource, Position and PopupSourceOffset. Applies relevant CSS classes.

sourcePanel — Which panel triggered this popup.
position — Desired positioning mode.
offset — Offset away from the .
Void Success()

Closes all panels, marks this one as a success and closes it.

Void Failure()

Closes all panels, marks this one as a failure and closes it.

Panel AddOption(String text, Action action = null)

Add an option to this popup with given text and click action.

Panel AddOption(String text, String icon, Action action = null)

Add an option to this popup with given text, icon and click action.

Void MoveSelection(Int32 dir)

Move selection in given direction.

dir — Positive numbers move selection downwards, negative - upwards.
virtual Void Tick()
virtual Void OnLayout(Rect layoutRect)
Assembly: Base Library Namespace: Sandbox.UI Full Name: Sandbox.UI.Popup