Trigger API Reference DCEI Functions Custom UI4 - BLKTower/TestWiki GitHub Wiki

Table of Contents

Trigger API Reference\DCEI Functions\Custom UI (5/8) {Trigger-API-ReferenceDCEI-FunctionsCustom-UI-58}

void SetFramePaddingLeft(Transform ui, float padding) {void-SetFramePaddingLeftTransform-ui-float-padding}

void SetFramePaddingLeft(Transform ui, float padding)

Description

Sets the left padding for a UI frame.

Parameters

  • Transform ui the frame to set left padding for.
  • float padding the left padding to set.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetPaddingLeft(frame, 20)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

void SetFramePaddingRight(Transform ui, float padding) {void-SetFramePaddingRightTransform-ui-float-padding}

void SetFramePaddingRight(Transform ui, float padding)

Description

Sets the right padding for a UI frame.

Parameters

  • Transform ui the frame to set right padding for.
  • float padding the right padding to set.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetPaddingRight(frame1, 20)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

void SetFramePaddingTop(Transform ui, float padding) {void-SetFramePaddingTopTransform-ui-float-padding}

void SetFramePaddingTop(Transform ui, float padding)

Description

Sets the top padding for a UI frame.

Parameters

  • Transform ui the frame to set top padding for.
  • float padding the top padding to set.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetPaddingTop(frame1, 20)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

void SetFramePaddingBottom(Transform ui, float padding) {void-SetFramePaddingBottomTransform-ui-float-padding}

void SetFramePaddingBottom(Transform ui, float padding)

Description

Sets the bottom padding for a UI frame.

Parameters

  • Transform ui the frame to set bottom padding for.
  • float padding the bottom padding to set.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetPaddingBottom(frame1, 20)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

void SetFrameSpacing(Transform ui, float spacing) {void-SetFrameSpacingTransform-ui-float-spacing}

void SetFrameSpacing(Transform ui, float spacing)

Description

Sets the spacing between child elements for a UI frame. This function affects frames that automatically position their children, such as stacks or scrolls. For scrolls, this function should be called on the content frame returned by DCEI.GetScrollContent().

Parameters

  • Transform ui the frame to set spacing for.
  • float spacing the spacing to set.

Example Usage

local stack = DCEI.NewVStack(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(stack, 0, 0, 0, 0.4)
DCEI.SetSpacing(stack, 20)
DCEI.SetPadding(stack, 20)

local frame1 = DCEI.NewFrame(stack)
DCEI.SetSize(frame1, 100, 100)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)

local frame2 = DCEI.NewFrame(stack)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

Related

void SetFrameLeftAlignment(Transform ui) {void-SetFrameLeftAlignmentTransform-ui}

void SetFrameLeftAlignment(Transform ui)

Description

Sets left alignment for a UI frame's contents.

Parameters

  • Transform ui the frame to set content alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetLeftAlignment(frame1)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

void SetFrameRightAlignment(Transform ui) {void-SetFrameRightAlignmentTransform-ui}

void SetFrameRightAlignment(Transform ui)

Description

Sets right alignment for a UI frame's contents.

Parameters

  • Transform ui the frame to set content alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetRightAlignment(frame1)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

void SetFrameTopAlignment(Transform ui) {void-SetFrameTopAlignmentTransform-ui}

void SetFrameTopAlignment(Transform ui)

Description

Sets top alignment for a UI frame's contents.

Parameters

  • Transform ui the frame to set content alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetTopAlignment(frame1)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

void SetFrameBottomAlignment(Transform ui) {void-SetFrameBottomAlignmentTransform-ui}

void SetFrameBottomAlignment(Transform ui)

Description

Sets bottom alignment for a UI frame's contents.

Parameters

  • Transform ui the frame to set content alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetBottomAlignment(frame1)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

void SetFrameCenterAlignment(Transform ui) {void-SetFrameCenterAlignmentTransform-ui}

void SetFrameCenterAlignment(Transform ui)

Description

Sets center alignment for a UI frame's contents. This is the default alignment.

Parameters

  • Transform ui the frame to set content alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetBottomAlignment(frame1)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

DCEI.TriggerAddTimerEventElapsed(
    function()
        DCEI.SetCenterAlignment(frame1)
    end,
    1, true
)

void SetFrameLeftAlignmentInParent(Transform ui) {void-SetFrameLeftAlignmentInParentTransform-ui}

void SetFrameLeftAlignmentInParent(Transform ui)

Description

Aligns a frame to its parent's left edge.

Note that setting left/right alignment won't work for frames that have their horizontal alignment determined by another source (ex, the children frames of an HStack). This can be worked around by wrapping the frame you want to reposition inside a blank frame.

Parameters

  • Transform ui the frame to set alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)
DCEI.SetLeftAlignmentInParent(frame2)

void SetFrameRightAlignmentInParent(Transform ui) {void-SetFrameRightAlignmentInParentTransform-ui}

void SetFrameRightAlignmentInParent(Transform ui)

Description

Aligns a frame to its parent's right edge.

Note that setting left/right alignment won't work for frames that have their horizontal alignment determined by another source (ex, the children frames of a HStack). This can be worked around by wrapping the frame you want to reposition inside a blank frame.

Parameters

  • Transform ui the frame to set alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)
DCEI.SetRightAlignmentInParent(frame2)

void SetFrameTopAlignmentInParent(Transform ui) {void-SetFrameTopAlignmentInParentTransform-ui}

void SetFrameTopAlignmentInParent(Transform ui)

Description

Aligns a frame to its parent's top edge.

Note that setting top/bottom alignment won't work for frames that have their vertical alignment determined by another source (ex, the children frames of a VStack). This can be worked around by wrapping the frame you want to reposition inside a blank frame.

Parameters

  • Transform ui the frame to set alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)
DCEI.SetTopAlignmentInParent(frame2)

void SetFrameBottomAlignmentInParent(Transform ui) {void-SetFrameBottomAlignmentInParentTransform-ui}

void SetFrameBottomAlignmentInParent(Transform ui)

Description

Aligns a frame to its parent's bottom edge.

Note that setting top/bottom alignment won't work for frames that have their vertical alignment determined by another source (ex, the children frames of a VStack). This can be worked around by wrapping the frame you want to reposition inside a blank frame.

Parameters

  • Transform ui the frame to set alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)
DCEI.SetBottomAlignmentInParent(frame2)

void SetFrameCenterAlignmentInParent(Transform ui) {void-SetFrameCenterAlignmentInParentTransform-ui}

void SetFrameCenterAlignmentInParent(Transform ui)

Description

Aligns a frame to its parent's center. This is the default alignment.

Note that setting top/bottom alignment won't work for frames that have their alignment determined by another source (ex, the children frames of a VStack or HStack). This can be worked around by wrapping the frame you want to reposition inside a blank frame.

Parameters

  • Transform ui the frame to set alignment for.

Example Usage

local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame1, 200, 200)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)

local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)
DCEI.SetBottomAlignmentInParent(frame2)

DCEI.TriggerAddTimerEventElapsed(
    function()
        DCEI.SetCenterAlignmentInParent(frame2)
    end,
    1, true
)

void SetFrameHorizontalOffsetInParent(Transform ui, float value) {void-SetFrameHorizontalOffsetInParentTransform-ui-float-value}

void SetFrameHorizontalOffsetInParent(Transform ui, float value)

Description

Offsets a frame horizontally from its starting position in its parent.

Note that setting an offset won't work for frames that have their alignment determined by another source (ex, the children frames of a VStack or HStack). This can be worked around by wrapping the frame you want to reposition inside a blank frame.

Parameters

  • Transform ui the frame to set the offset for.
  • float value the offset distance.

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 200, 200)
DCEI.SetBackgroundImageColor(frame, 1, 0, 1, 0.4)
DCEI.SetHorizontalOffsetInParent(frame, 200)

void SetFrameVerticalOffsetInParent(Transform ui, float value) {void-SetFrameVerticalOffsetInParentTransform-ui-float-value}

void SetFrameVerticalOffsetInParent(Transform ui, float value)

Description

Offsets a frame vertically from its starting position in its parent.

Note that setting an offset won't work for frames that have their alignment determined by another source (ex, the children frames of a VStack or HStack). This can be worked around by wrapping the frame you want to reposition inside a blank frame.

Parameters

  • Transform ui the frame to set the offset for.
  • float value the offset distance.

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 200, 200)
DCEI.SetBackgroundImageColor(frame, 1, 0, 1, 0.4)
DCEI.SetVerticalOffsetInParent(frame, 100)

void SetFrameReverseChildrenFrameOrder(Transform ui, bool value) {void-SetFrameReverseChildrenFrameOrderTransform-ui-bool-value}

void SetFrameReverseChildrenFrameOrder(Transform ui, bool value)

Description

Reverses the order in which frames are added to a HStack, VStack, HScroll, or VScroll. This will affect newly added child frames as well as any child frames that have already been added.

Parameters

  • Transform ui the frame to reverse the layout order for.
  • bool value if true, reverses the layout order.

Example Usage

local stack = DCEI.NewVStack(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(stack, 0, 0, 0, 0.4)
DCEI.SetSpacing(stack, 20)
DCEI.SetPadding(stack, 20)

local frame1 = DCEI.NewFrame(stack)
DCEI.SetSize(frame1, 100, 100)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)

local frame2 = DCEI.NewFrame(stack)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)

DCEI.TriggerAddTimerEventElapsed(
    function()
        DCEI.SetReverseLayoutOrder(stack, true)
    end,
    1, true
)

Related

void SetFrameImage(Transform ui, string name) {void-SetFrameImageTransform-ui-string-name}

void SetFrameImage(Transform ui, string name)

Description

Sets the background image of a UI frame.

Parameters

  • Transform ui the frame to set the background image for.
  • string name the image name.

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 100, 100)
DCEI.SetBackgroundImage(frame, "airship_onMap")

void SetFrameImageExpression(Transform ui, string expression) {void-SetFrameImageExpressionTransform-ui-string-expression}

void SetFrameImageExpression(Transform ui, string expression)

Description

Sets the background image of a frame to the given expression. Expressions use data bound by DCEI.BindData() or BindUnit().

Parameters

  • Transform ui the frame to set the background image for.
  • string expression the expression.

Example Usage

local vstack = DCEI.NewVStack(DCEI.GetUiRoot())

local data_frame = DCEI.NewFrame(vstack)
DCEI.SetSize(data_frame, 100, 100)

local data = {image = "airship_onMap"}
DCEI.BindData("data", data)
DCEI.SetBackgroundImageExpression(data_frame, "data.image")

local unit_frame = DCEI.NewFrame(vstack)
DCEI.SetSize(unit_frame, 100, 100)

local unit = DCEI.CreateUnit(1, 1, "Standard MeleeUnit", 16, 16, 0, -1)
DCEI.BindUnit("selected", unit)

-- this will display the icon of the bound unit, however none of the default units have icons
DCEI.SetBackgroundImageExpression(unit_frame, "selected.Info.Icon")

Related

void SetFrameImageGrayScaleExpression(Transform ui, string expression) {void-SetFrameImageGrayScaleExpressionTransform-ui-string-expression}

void SetFrameImageGrayScaleExpression(Transform ui, string expression)

Description

Sets the background image of a frame to the given expression in gray scale. Expressions use data bound by DCEI.BindData() or BindUnit().

Parameters

  • Transform ui the frame to set the background image for.
  • string expression the expression. The expression should evaluate out to a 0 or 1, corresponding to a false or true, respectively. Does not accept true or false by itself.

Example Usage

local vstack = DCEI.NewVStack(DCEI.GetUiRoot())

local data_frame = DCEI.NewFrame(vstack)
DCEI.SetSize(data_frame, 100, 100)

local data = {image = "airship_onMap", gray = 1}
DCEI.BindData("data", data)
DCEI.SetBackgroundImageExpression(data_frame, "data.image")
DCEI.SetBackgroundImageGrayScaleExpression(data_frame, "data.gray")

local unit_frame = DCEI.NewFrame(vstack)
DCEI.SetSize(unit_frame, 100, 100)

local unit = DCEI.CreateUnit(1, 1, "Standard MeleeUnit", 16, 16, 0, -1)
DCEI.BindUnit("selected", unit)

-- this will display the icon of the bound unit, however none of the default units have icons
DCEI.SetBackgroundImageExpression(unit_frame, "selected.Info.Icon")

-- background image will be grayed out while the unit's health is >0
DCEI.SetBackgroundImageGrayScaleExpression(unit_frame, "selected.Health.Fraction")

Related

void SetButtonFrameEnableExpression(Transform ui, string expression) {void-SetButtonFrameEnableExpressionTransform-ui-string-expression}

void SetButtonFrameEnableExpression(Transform ui, string expression)

Description

Sets an expression to enable a button. Expressions use data bound by DCEI.BindData() or BindUnit().

Parameters

  • Transform ui the button to enable.
  • string expression the expression. The expression should evaluate out to a 0 or 1, corresponding to a false or true, respectively. Does not accept true or false by itself.

Example Usage

local vstack = DCEI.NewVStack(DCEI.GetUiRoot())

local data_button = DCEI.NewButton(vstack)
DCEI.SetSize(data_button, 100, 100)

local btn_data = {enable = 0}
DCEI.BindData("data", btn_data)
DCEI.SetEnableButtonExpression(data_button, "data.enable")

local unit_button = DCEI.NewButton(vstack)
DCEI.SetSize(unit_button, 100, 100)

local unit = DCEI.CreateUnit(1, 1, "Standard MeleeUnit 2", 16, 16, 0, -1)
DCEI.BindUnit("selected", unit)

-- button will be disabled when the unit is dead
DCEI.SetEnableButtonExpression(unit_button, "selected.Health.Fraction")

Related

SetBackgroundImageTiled()

void SetBackgroundImageTiled(Transform ui, bool setTiled)

Description

Sets the tiling of the background image for a UI frame. If tiling is disabled, the image is stretched to fill the frame. You can adjust the tiling resolution with DCEI.SetPixelsPerUnitMultiplier.

Parameters

  • Transform ui the frame to set the background image for.
  • bool setTiled if true, enables background image tiling (with the original resolution of the background image). This is false by default for newly created frames.

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 400, 400)
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.SetBackgroundImageTiled(frame, true)

void SetFrameImageTiled(Transform ui, bool setTiled) {void-SetFrameImageTiledTransform-ui-bool-setTiled}

void SetFrameImageTiled(Transform ui, bool setTiled)

Description

Parameters

Example Usage

void SetFramePixelsPerUnitMultiplier(Transform ui, float pixelsPerUnitMultiplier) {void-SetFramePixelsPerUnitMultiplierTransform-ui-float-pixelsPerUnitMultiplier}

void SetFramePixelsPerUnitMultiplier(Transform ui, float pixelsPerUnitMultiplier)

Description

Sets the pixels per unit multiplier for a UI frame. This multiplier is the ratio between screen units and image pixels. This can be used to adjust the tiling resolution of frames using DCEI.SetBackgroundImageTiled() and the edge/corner resolution of nineslice textures.

Parameters

  • Transform ui the frame to set the multiplier for.
  • float pixelsPerUnitMultiplier the pixels per unit multiplier.

Example Usage

-- This would reduce the frame's background image's size to 1/5.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.SetSize(frame, 500, 500)
DCEI.SetPixelsPerUnitMultiplier(frame, 5)

Related

void SetFrameImageFillAmount(Transform ui, float fill) {void-SetFrameImageFillAmountTransform-ui-float-fill}

void SetFrameImageFillAmount(Transform ui, float fill)

Description

Sets the fill amount for the background image.

Parameters

  • Transform ui the frame to set the background image fill amount for.
  • float fill the fill amount (between 0 and 1).

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 100, 100)
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.SetBackgroundImageFillAmount(frame, 0.5)

Related

float GetFrameImageFillAmount(Transform ui) {float-GetFrameImageFillAmountTransform-ui}

float GetFrameImageFillAmount(Transform ui)

Description

Returns the background image fill amount.

Parameters

  • Transform ui the frame to get the background image fill amount of.

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 100, 100)
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.SetBackgroundImageFillAmount(frame, 0.5)

local fill = DCEI.GetBackgroundImageFillAmount(frame)
DCEI.LogMessage("Frame background image fill amount: " .. fill)

void SetFrameImageFillHorizontal(Transform ui) {void-SetFrameImageFillHorizontalTransform-ui}

void SetFrameImageFillHorizontal(Transform ui)

Description

Sets the background image fill for a frame to be horizontal. This is the default fill direction.

Parameters

  • Transform ui the frame to set the background image fill direction for.

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 100, 100)
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.SetBackgroundImageFillAmount(frame, 0.5)
DCEI.SetBackgroundImageFillHorizontal(frame)

void SetFrameImageFillVertical(Transform ui) {void-SetFrameImageFillVerticalTransform-ui}

void SetFrameImageFillVertical(Transform ui)

Description

Sets the background image fill for a frame to be vertical. The default fill direction is horizontal.

Parameters

  • Transform ui the frame to set the background image fill direction for.

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 100, 100)
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.SetBackgroundImageFillAmount(frame, 0.5)
DCEI.SetBackgroundImageFillVertical(frame)

void SetFrameImageFillRadial(Transform ui) {void-SetFrameImageFillRadialTransform-ui}

void SetFrameImageFillRadial(Transform ui)

Description

Sets the background image fill for a frame to be radial. This is useful for making circular progress bars. The default fill direction is horizontal.

Parameters

  • Transform ui the frame to set the background image fill direction for.

Example Usage

local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 100, 100)
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.SetBackgroundImageFillAmount(frame, 0.75)
DCEI.SetBackgroundImageFillRadial(frame)

void SetFrameImageFillOrigin(Transform ui, int origin) {void-SetFrameImageFillOriginTransform-ui-int-origin}

void SetFrameImageFillOrigin(Transform ui, int origin)

Description

Sets the fill progress orientation of a UI frame.

Parameters

  • Transform ui the frame to modify.
  • int origin the fill mode to apply. Accepted values:
    [0, 1] for horizontal or vertical fills ([left, right] and [bottom, top])
    [0, 1, 2, 3] for radial fills ([bottom, right, top, left])
    

Example Usage

local countdown = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImage(countdown, "circle01")
DCEI.SetSize(countdown, 128, 128)

DCEI.SetBackgroundImageFillRadial(countdown)
DCEI.SetBackgroundImageFillOrigin(countdown, 1)
DCEI.SetBackgroundImageFillAmount(countdown, 0.75)

⚠️ **GitHub.com Fallback** ⚠️