Container#

class UI.Container()#

The base class of canvases and panels, which other objects can be added to.

Base class: UI.Object
Derived classes: UI.Canvas, UI.Panel
Container.addPanel([visible])#

Add a panel to this object.

Arguments:
  • visible (boolean) – Whether the new panel is visible. Defaults to true.

Return type:

UI.Panel

Container.addText(content[, visible])#

Add text to this object.

Arguments:
  • content (string) – The text.

  • visible (boolean) – Whether the text is visible. Defaults to true.

Return type:

UI.Text

Container.addInputField([visible])#

Add an input field to this object.

Arguments:
  • visible (boolean) – Whether the input field is visible. Defaults to true.

Return type:

UI.InputField

Container.addButton(content[, visible])#

Add a button to this object.

Arguments:
  • content (string) – The label for the button.

  • visible (boolean) – Whether the button is visible. Defaults to true.

Return type:

UI.Button

Container.addToggle(content[, visible])#

Add a toggle to this object.

Arguments:
  • content (string) – The label for the toggle.

  • visible (boolean) – Whether the toggle is visible. Defaults to true.

Return type:

UI.Toggle

Container.addToggleGroup()#

Add a toggle group to this object, to make a set of toggles into radio buttons.

Return type:

UI.ToggleGroup

Note

The group is not drawn and does not take up any space. The toggles that belong to it can be added anywhere.

Container.addSlider([vertical[, visible]])#

Add a slider to this object.

Arguments:
  • vertical (boolean) – Whether the slider runs from bottom to top, rather than from left to right. Defaults to false.

  • visible (boolean) – Whether the slider is visible. Defaults to true.

Return type:

UI.Slider

Container.addDropdown([visible])#

Add a dropdown to this object.

Arguments:
  • visible (boolean) – Whether the dropdown is visible. Defaults to true.

Return type:

UI.Dropdown

Container.addImage([visible])#

Add an image to this object.

Arguments:
  • visible (boolean) – Whether the image is visible. Defaults to true.

Return type:

UI.Image

Container.addScrollView([visible])#

Add a scroll view to this object.

Arguments:
  • visible (boolean) – Whether the scroll view is visible. Defaults to true.

Return type:

UI.ScrollView