Skip to main content

UI Sections

BlendMode

BlendMode:Normal -> symbol
BlendMode:Multiply -> symbol
BlendMode:Screen -> symbol
BlendMode:Overlay -> symbol
BlendMode:Darken -> symbol
BlendMode:Lighten -> symbol
BlendMode:ColorDodge -> symbol
BlendMode:ColorBurn -> symbol
BlendMode:HardLight -> symbol
BlendMode:SoftLight -> symbol
BlendMode:Difference -> symbol
BlendMode:Exclusion -> symbol
BlendMode:Hue -> symbol
BlendMode:Saturation -> symbol
BlendMode:Color -> symbol
BlendMode:Luminosity -> symbol

These constants can be used to control how the content of a section in the user interface is blended with the content behind it. This is required by a parameter called blend by functions like Content or Transmission. Wikipedia has a good reference on blend modes.

Command

this.BottomLeftCommand<Id = auto>(key?=, blend?, dismissed?, order?, offset, audience?, [owner?]) |use ui| { }
this.BottomRightCommand<Id = auto>(key?=, blend?, dismissed?, order?, offset, audience?, [owner?]) |use ui| { }
delete this.BottomLeftCommand<Id>
delete this.BottomRightCommand<Id>

Displays content overlaid over the rest of the user interface. The content is anchored to a corner of the screen by the given offset. The function determines which part of the user interface to display the content in:

  • BottomLeftCommand: Overlays the content over the bottom left corner of the screen.
  • BottomRightCommand: Overlays the content over the bottom right corner of the screen.

Parameters:

  • this (Entity): Defines the lifespan of the content. When this is despawned, the content is removed.
  • Id: If called twice with the same this and Id, the previous content is replaced.
  • key (any Keyable value): An optional key to identify the content when using ShowIntent.
  • dismissed (Boolean): If true, the content is not displayed until it is shown using ShowIntent.
  • order (Number): Content is first ordered within its section by its order parameter, then by creation order. Defaults to 0.
  • offset (Vector): Defines the position of the center of the content, relative to the corner of the screen. Measured in em units. You should provide positive values for both x and y to position the content within the screen.
  • audience (Entity): If set to a player or team, then only that player or team can see the content. Defaults to owner.
  • owner (Entity): Only used as the default value for audience.
  • blend (Symbol): How to blend the content of this section with the content behind it. See BlendMode for a list of blend modes.

The delve callback will be called immediately to provide the content to display.

CommandBar

this.CommandBar<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.CommandBarLeft<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.CommandBarRight<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
delete this.CommandBar<Id>
delete this.CommandBarLeft<Id>
delete this.CommandBarRight<Id>

Displays content in the CommandBar which is a bar that runs along the bottom part of the user interface. The function determines which part of the user interface to display the content in:

  • CommandBar: The middle of the CommandBar.
  • CommandBarLeft: The left side of the CommandBar.
  • CommandBarRight: The right side of the CommandBar.

Parameters:

  • this (Entity): Defines the lifespan of the content. When this is despawned, the content is removed.
  • Id: If called twice with the same this and Id, the previous content is replaced.
  • key (any Keyable value): An optional key to identify the content when using ShowIntent.
  • dismissed (Boolean): If true, the content is not displayed until it is shown using ShowIntent.
  • order (Number): Content is first ordered within its section by its order parameter, then by creation order. Defaults to 0.
  • audience (Entity): If set to a player or team, then only that player or team can see the content. Defaults to owner.
  • owner (Entity): Only used as the default value for audience.
  • blend (Symbol): How to blend the content of this section with the content behind it. See BlendMode for a list of blend modes.

The delve callback will be called immediately to provide the content to display.

Content

this.Content<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.ContentScreen<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.SidebarContent<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.OverlayContent<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.TopContent<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.BottomContent<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.BottomLeftContent<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.BottomRightContent<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
delete this.Content<Id>
delete this.ContentScreen<Id>
delete this.OverlayContent<Id>
delete this.TopContent<Id>
delete this.BottomContent<Id>
delete this.BottomLeftContent<Id>
delete this.BottomRightContent<Id>
delete this.SidebarContent<Id>

Displays content in the user interface. The function determines which part of the user interface to display the content in:

  • Content: The main content area in the top left corner of the screen.
  • ContentScreen: When using a page fn, displays the content as a screen at the top of the page. Does nothing if inside a game fn.
  • SidebarContent: If the screen is wide enough, displays the content on the right hand side of the screen by itself. Otherwise, displays the content underneath the main content area on the left. The sidebar may be toggled on and off by the player, so do not rely on it being visible.
  • OverlayContent: Overlays the content over everything else and centers it within the screen.
  • TopContent: Displays the content centered at the top, overlaid over other content.
  • BottomContent: Displays the content centered at the bottom, overlaid over other content.
  • BottomLeftContent: Displays the content in the bottom left corner, overlaid over other content.
  • BottomRightContent: Displays the content in the bottom right corner, overlaid over other content.

Parameters:

  • this (Entity): Defines the lifespan of the content. When this is despawned, the content is removed.
  • Id: If called twice with the same this and Id, the previous content is replaced.
  • key (any Keyable value): An optional key to identify the content when using ShowIntent.
  • dismissed (Boolean): If true, the content is not displayed until it is shown using ShowIntent.
  • order (Number): Content is first ordered within its section by its order parameter, then by creation order. Defaults to 0.
  • audience (Entity): If set to a player or team, then only that player or team can see the content. Defaults to owner.
  • owner (Entity): Only used as the default value for audience.
  • blend (Symbol): How to blend the content of this section with the content behind it. See BlendMode for a list of blend modes.

The delve callback will be called immediately to provide the content to display.

DismissIntent

DismissIntent -> intent

Returns an intent to hide the current section of the user interface. Attach this intent to a Button to trigger it. This is normally intended to be used to dismiss a Modal dialog, but can be used for other sections as well.

HideIntent

HideIntent<Id>(key?) -> intent

Returns an intent to hide content in the user interface. The content must have already been created using a function such as Content, Toolbar or Modal. The intent can be attached to a Button to trigger it.

Parameters:

  • Id: The id of the content to hide. Must match the ID provided to the Content function.
  • key (any Keyable value): The key of the content to hide. Must match the key provided to the Content function.
this.Modal<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.TopModal<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.BottomModal<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
delete this.Modal<Id>
delete this.TopModal<Id>
delete this.BottomModal<Id>

Displays modal content in the user interface. Modal content covers the rest of the user interface and must be dismissed first by the user before they are able to interact with the rest of the game. The function determines which part of the user interface to display the content in:

  • Modal: Displays the content in the center of the screen.
  • TopModal: Displays content near the top of the screen.
  • BottomModal: Displays content near the bottom of the screen.

Parameters:

  • this (Entity): Defines the lifespan of the content. When this is despawned, the content is removed.
  • Id: If called twice with the same this and Id, the previous content is replaced.
  • key (any Keyable value): An optional key to identify the content when using ShowIntent.
  • dismissed (Boolean): If true, the content is not displayed until it is shown using ShowIntent.
  • order (Number): Modals with higher order will be displayed on top of modals with lower order.
  • audience (Entity): If set to a player or team, then only that player or team can see the content. Defaults to owner.
  • owner (Entity): Only used as the default value for audience.
  • blend (Symbol): How to blend the content of this section with the content behind it. See BlendMode for a list of blend modes.

The delve callback will be called immediately to provide the content to display.

RevealOnHoverIntent

RevealOnHoverIntent<Id>(key?, show?=, hide?) -> intent

Returns an intent to reveal content in the user interface when a button is hovered on. The content must have already been created using a function such as Content, Toolbar or Modal. The intent can be attached to a Button to trigger it.

Parameters:

  • Id: The id of the content to show. Must match the ID provided to the Content function.
  • key (any Keyable value): The key of the content to show. Must match the key provided to the Content function.
  • show (Boolean): If true (the default), shows the content when the button is hovered over.
  • hide (Boolean): If true (the default), hides the content when the button is no longer hovered over.

ShowIntent

ShowIntent<Id>(key?) -> intent

Returns an intent to show content in the user interface. The content must have already been created using a function such as Content, Toolbar or Modal. For this to have an effect, the content should have previously been hidden by setting its dismissed parameter set to true. The intent can be attached to a Button to trigger it.

Parameters:

  • Id: The id of the content to show. Must match the ID provided to the Content function.
  • key (any Keyable value): The key of the content to show. Must match the key provided to the Content function.

ToggleShowIntent

ToggleShowIntent<Id>(key?) -> intent

Returns an intent to toggle whether content is shown or hidden in the user interface. The content must have already been created using a function such as Content, Toolbar or Modal. The intent can be attached to a Button to trigger it.

Parameters:

  • Id: The id of the content to show or hide. Must match the ID provided to the Content function.
  • key (any Keyable value): The key of the content to show or hide. Must match the key provided to the Content function.

Toolbar

this.Toolbar<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.ToolbarRight<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
this.ToolbarBack<Id = auto>(key?=, blend?, dismissed?, order?, audience?, [owner?]) |use ui| { }
delete this.Toolbar<Id>
delete this.ToolbarRight<Id>
delete this.ToolbarBack<Id>

Displays content in the user interface. The function determines which part of the user interface to display the content in:

  • Toolbar: The main part of the toolbar at the top of the screen.
  • ToolbarRight: The right side of the toolbar.
  • ToolbarBack: The back button on the toolbar. If no ToolbarBack content is provided anywhere in the game, the engine will automatically display a button to return to the home page.

Parameters:

  • this (Entity): Defines the lifespan of the content. When this is despawned, the content is removed.
  • Id: If called twice with the same this and Id, the previous content is replaced.
  • key (any Keyable value): An optional key to identify the content when using ShowIntent.
  • dismissed (Boolean): If true, the content is not displayed until it is shown using ShowIntent.
  • order (Number): Content is first ordered within its section by its order parameter, then by creation order. Defaults to 0.
  • audience (Entity): If set to a player or team, then only that player or team can see the content. Defaults to owner.
  • owner (Entity): Only used as the default value for audience.
  • blend (Symbol): How to blend the content of this section with the content behind it. See BlendMode for a list of blend modes.

The delve callback will be called immediately to provide the content to display.

Transmission

this.Transmission<Id = auto>(duration?=, blend?, audience?, [owner?]) |use ui| { }
this.OverlayTransmission<Id = auto>(duration?=, blend?, audience?, [owner?]) |use ui| { }
this.TopTransmission<Id = auto>(duration?=, blend?, audience?, [owner?]) |use ui| { }
this.BottomTransmission<Id = auto>(duration?=, blend?, audience?, [owner?]) |use ui| { }
delete this.Transmission<Id>
delete this.OverlayTransmission<Id>
delete this.TopTransmission<Id>
delete this.BottomTransmission<Id>

Displays temporary content in the user interface. The content will expire after a specified duration. The function determines which part of the interface the content will be displayed in.

  • Transmission will display content within the messages panel, along with any chat messages.
  • OverlayTransmission will display content centered over the entire interface.
  • TopTransmission will overlay content at the top of the interface.
  • BottomTransmission will overlay content at the bottom of the interface.

Parameters:

  • this (Entity): The entity performing the transmission. Used to identify the transmission so it can be replaced or deleted later.
  • Id: The previous transmission with the same this and Id will be replaced by this new one.
  • duration (Number): The number of ticks for which to display this content. Defaults to 60s.
  • audience (Entity): If set to a player or team, only that player or team will see the content. Defaults to owner.
  • owner (Entity): The default value for audience.
  • blend (Symbol): How to blend the content of this transmission with the content behind it. See BlendMode for a list of blend modes.

The delve block will be called immediately to populate the transmission.