Constructor
# new DuPopup()
Properties:
Name | Type | Description |
---|---|---|
content |
Group
|
The ScriptUI group where the new controls must be added. Do not add any control directly inside the DuPopup. |
pinned |
boolean
|
true if this popup is "pinned", which means it won't hide when the user clicks outside of the window. |
build |
DuPopup~build
|
You can use this callback to add a function which builds the UI of the popup, it will be called on first display. |
Members
Boolean
# static block
Sets this parameter to
This will prevent it from showing once (and only once).
true
to prevent the next show of the popup.This will prevent it from showing once (and only once).
- Default Value:
- false
Methods
# cancel()
Hides the popup (alias for
DuPopup.hidePopup
).
# static pin(pinnedopt)
Pins the popup (it won't be hidden anymore when deactivated).
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
pinned |
boolean
|
<optional> |
true | true to pin the popup, false to un-pin it. |
# static tieTo(controlopt, onShiftopt, alwaysBlockopt)
Ties the popup to a ui control. The popup will be shown just above the control when it is clicked.
The control must have an addEventListener method.
The control must have an addEventListener method.
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
control |
ScriptUI
|
<optional> |
The control | |
onShift |
Boolean
|
<optional> |
false | If set to true, the popup is tied on Shift + Click only |
alwaysBlock |
boolean
|
<optional> |
false | If true, the popup will never be automatically shown. Call show() to show it. |
Type Definitions
# build()
You can use this callback to add a function which builds the UI of the popup, it will be called on first display.
This allows a faster startup of your script by delaying the creation of the tabs which are hidden at startup.
You can add controls in the
This allows a faster startup of your script by delaying the creation of the tabs which are hidden at startup.
You can add controls in the
this.content
object.