Learn / Documentation / Script Reference / UIPopupContentReferences

UIPopupContentReferences

class in Doozy.Engine.UI

Description

The UIPopupContentReferences class contains references to UIPopup elements that can be customized (Labels, Images and Buttons)
See Also: UIPopup, UIButton

Properties

  • public int ButtonsCount – Returns the number of entries in the Buttons list

  • public bool HasButtons – Returns TRUE if the Buttons list has at least one entry

  • public bool HasImages – Returns TRUE if the Images list has at least one entry

  • public bool HasLabels – Returns TRUE if the Labels list has at least one entry

  • public int ImagesCount – Returns the number of entries in the Images list

  • public int LabelsCount – Returns the number of entries in the Labels list

Public Variables

Public Methods

  • public void SetButtonsCallbacks(params UnityAction[] callbacks) – Sets the passed callback as Buttons OnClick listener.

    Buttons[0].OnClick.OnTrigger.Event.AddListener(callbacks[0])
    Buttons[1].OnClick.OnTrigger.Event.AddListener(callbacks[1])
    ...
    Buttons[n].OnClick.OnTrigger.Event.AddListener(callbacks[n])
  • public void SetButtonsLabels(params string[] buttonLabels) – Sets the passed strings as the referenced Buttons label text.

    Buttons[0].SetLabelText(buttonLabels[0])
    Buttons[1].SetLabelText(buttonLabels[1])
    ...
    Buttons[n].SetLabelText(buttonLabels[n])
  • public void SetButtonsNames(params string[] buttonNames) – Sets the passed strings as the referenced Buttons button name.

    Buttons[0].ButtonName = buttonNames[0]
    Buttons[1].ButtonName = buttonNames[1]
    ...
    Buttons[n].ButtonName = buttonNames[n]
  • public void SetContentData(UIPopupContentData data) – Sets the given content data to all of the referenced components in the lists

  • public void SetImagesSprites(params Sprite[] sprites) – Sets the passed sprites as Images sprite.

    Images[0].sprite = sprites[0]
    Images[1].sprite = sprites[1]
    ...
    Images[n].sprite = sprites[n]
  • public void SetLabelsTexts(params string[] labels) – Sets the passed strings as Labels text.

    Labels[0].text = labels[0]
    Labels[1].text = labels[1]
    ...
    Labels[n].text = labels[n]