Trigger API Reference DCEI Functions Custom UI3 - BLKTower/TestWiki GitHub Wiki
Trigger API Reference\DCEI Functions\Custom UI (4/8) {Trigger-API-ReferenceDCEI-FunctionsCustom-UI-48}
- Trigger API Reference\DCEI Functions\Custom UI (1/4)
- Trigger API Reference\DCEI Functions\Custom UI (2/4)
- Trigger API Reference\DCEI Functions\Custom UI (3/4)
void SetTextFrameShadowDirection(Transform text, float x, float y) {void-SetTextFrameShadowDirectionTransform-text-float-x-float-y}
void SetTextFrameShadowDirection(Transform text, float x, float y)Sets the direction for a text frame's text shadow. The coordinate's direction is based on the unit circle. The magnitude of the offset has a small effect on the shadow length.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(frame, 1, 1, 0, 0.5)
local text_frame = DCEI.NewText(frame)
DCEI.SetText(text_frame, "Text")
DCEI.SetSize(text_frame, 200, 100)
DCEI.SetTextFontSize(text_frame, 50)
DCEI.SetTextShadowDirection(text_frame, 100, 100)string GetInputFrameText(Transform text)Returns the text entered into an input text frame.
local input_frame = DCEI.NewInput(DCEI.GetUiRoot())
DCEI.SetSize(input_frame, 100, 50)
DCEI.SetInputText(input_frame, "Input Frame")
local input = DCEI.GetInputText(input_frame)
DCEI.LogMessage(input)void SetInputFrameText(Transform text, string content) {void-SetInputFrameTextTransform-text-string-content}
void SetInputFrameText(Transform text, string content)Sets the text for an input frame.
local input_frame = DCEI.NewInput(DCEI.GetUiRoot())
DCEI.SetSize(input_frame, 100, 50)
DCEI.SetInputText(input_frame, "Input Frame")void SetInputFrameFontSize(Transform text, float size) {void-SetInputFrameFontSizeTransform-text-float-size}
void SetInputFrameFontSize(Transform text, float size)Sets the text size for an input frame.
local input_frame = DCEI.NewInput(DCEI.GetUiRoot())
DCEI.SetSize(input_frame, 100, 50)
DCEI.SetInputText(input_frame, "Input Frame")
DCEI.SetInputTextFontSize(input_frame, 50)void SetInputFrameColor(Transform text, ColorRGB color) {void-SetInputFrameColorTransform-text-ColorRGB-color}
void SetInputFrameColor(Transform text, ColorRGB color)void SetInputFrameColorRGB(Transform text, ColorRGB color) {void-SetInputFrameColorRGBTransform-text-ColorRGB-color}
void SetInputFrameColorRGB(Transform text, ColorRGB color)void SetInputFrameWrapping(Transform text, bool enable) {void-SetInputFrameWrappingTransform-text-bool-enable}
void SetInputFrameWrapping(Transform text, bool enable)Sets text wrapping for an input frame.
-
Transform
textthe input frame. -
bool
enableif true, enables text wrapping. This is false by default for newly created input frames.
local input_frame = DCEI.NewInput(DCEI.GetUiRoot())
DCEI.SetSize(input_frame, 100, 50)
DCEI.SetInputText(input_frame, "Input Frame Wrapping Test")
DCEI.SetInputTextWrapping(input_frame, true)void SetInputFramePlaceholder(Transform text, string content) {void-SetInputFramePlaceholderTransform-text-string-content}
void SetInputFramePlaceholder(Transform text, string content)Sets the text placeholder for an input frame.
local input_frame = DCEI.NewInput(DCEI.GetUiRoot())
DCEI.SetSize(input_frame, 100, 50)
DCEI.SetInputPlaceholder(input_frame, "Edit me")void SetInputFramePlaceholderFontSize(Transform text, float size) {void-SetInputFramePlaceholderFontSizeTransform-text-float-size}
void SetInputFramePlaceholderFontSize(Transform text, float size)Sets the placeholder text size for an input frame.
local input_frame = DCEI.NewInput(DCEI.GetUiRoot())
DCEI.SetSize(input_frame, 100, 50)
DCEI.SetInputPlaceholder(input_frame, "Input Placeholder")
DCEI.SetInputPlaceholderFontSize(input_frame, 50)void SetInputFramePlaceholderColor(Transform text, ColorRGB color) {void-SetInputFramePlaceholderColorTransform-text-ColorRGB-color}
void SetInputFramePlaceholderColor(Transform text, ColorRGB color)void SetInputFramePlaceholderColorRGB(Transform text, ColorRGB color) {void-SetInputFramePlaceholderColorRGBTransform-text-ColorRGB-color}
void SetInputFramePlaceholderColorRGB(Transform text, ColorRGB color)void SetInputFramePlaceholderOutline(Transform text, bool outline) {void-SetInputFramePlaceholderOutlineTransform-text-bool-outline}
void SetInputFramePlaceholderOutline(Transform text, bool outline)Sets the text placeholder's outline for an input frame.
-
Transform
textthe input frame. -
bool
outlineif true, displays the outline. This is false by default for newly created input frames.
local input_frame = DCEI.NewInput(DCEI.GetUiRoot())
DCEI.SetSize(input_frame, 100, 50)
DCEI.SetInputPlaceholder(input_frame, "Input Placeholder")
DCEI.SetInputPlaceholderOutline(input_frame, true)void SetUserInputTextFrameText(Transform text, string content) {void-SetUserInputTextFrameTextTransform-text-string-content}
void SetUserInputTextFrameText(Transform text, string content)Sets the text for a user input text frame.
local vstack = DCEI.NewVStack(DCEI.GetUiRoot())
local input_frame = DCEI.NewInput(vstack)
DCEI.SetInputText(input_frame, "Input Frame")
DCEI.SetSize(input_frame, 300, 50)
local input = DCEI.GetInputText(input_frame)
local user_input = DCEI.NewUserInputText(vstack)
DCEI.SetSize(user_input, 300, 50)
DCEI.SetBackgroundImageColor(user_input, 1, 0, 1, 0.4)
DCEI.SetUserInputText(user_input, input)void SetUserInputTextFrameFontSize(Transform text, float size) {void-SetUserInputTextFrameFontSizeTransform-text-float-size}
void SetUserInputTextFrameFontSize(Transform text, float size)Sets the text size for a user input text frame.
local user_input = DCEI.NewUserInputText(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(user_input, 1, 0, 0, 0.5)
DCEI.SetSize(user_input, 400, 100)
DCEI.SetUserInputText(user_input, "User Input Text")
DCEI.SetUserInputTextFontSize(user_input, 50)void SetUserInputTextFrameColor(Transform text, ColorRGB color) {void-SetUserInputTextFrameColorTransform-text-ColorRGB-color}
void SetUserInputTextFrameColor(Transform text, ColorRGB color)void SetUserInputTextFrameColorRGB(Transform text, ColorRGB color) {void-SetUserInputTextFrameColorRGBTransform-text-ColorRGB-color}
void SetUserInputTextFrameColorRGB(Transform text, ColorRGB color)void SetUserInputTextFrameWrapping(Transform text, bool enable) {void-SetUserInputTextFrameWrappingTransform-text-bool-enable}
void SetUserInputTextFrameWrapping(Transform text, bool enable)Sets text wrapping for a user input text frame.
-
Transform
textthe input frame. -
bool
enableif true, enables text wrapping. This is false by default for newly created user input text frames.
local user_input = DCEI.NewUserInputText(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(user_input, 1, 0, 0, 0.5)
DCEI.SetSize(user_input, 200, 100)
DCEI.SetUserInputText(user_input, "User Input Text")
DCEI.SetUserInputTextFontSize(user_input, 50)
DCEI.SetUserInputTextWrapping(user_input, true)void SetFrameMinSize(Transform ui, float width, float height) {void-SetFrameMinSizeTransform-ui-float-width-float-height}
void SetFrameMinSize(Transform ui, float width, float height)Sets the minimum size of a frame. The frame will still expand to fit its content if larger than this minimum size.
-
Transform
uithe frame to adjust. -
float
widththe new minimum width of the frame. -
float
heightthe new minimum height of the frame.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetMinSize(frame, 100, 100)
DCEI.SetBackgroundImageColor(frame, 0, 0, 1, 0.5)void SetFrameMinWidth(Transform ui, float width)Sets the minimum width of a frame. The frame will still expand to fit its content if larger than this minimum width.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetFrameMinWidth(frame, 100)
DCEI.SetBackgroundImageColor(frame, 0, 0, 1, 0.5)void SetFrameMinHeight(Transform ui, float height) {void-SetFrameMinHeightTransform-ui-float-height}
void SetFrameMinHeight(Transform ui, float height)Sets the minimum height of a frame. The frame will still expand to fit its content if larger than this minimum height.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetFrameMinHeight(frame, 100)
DCEI.SetBackgroundImageColor(frame, 0, 0, 1, 0.5)void SetFrameMaxSize(Transform ui, float width, float height) {void-SetFrameMaxSizeTransform-ui-float-width-float-height}
void SetFrameMaxSize(Transform ui, float width, float height)Sets the maximum size of a frame. The frame will still shrink to fit its content if smaller than this maximum size.
Can be used with text frames to create dynamic text scaling (with DCEI.SetTextFontSizeMin/DCEI.SetTextFontSizeMax).
-
Transform
uithe frame to adjust. -
float
widththe new maximum width of the frame. -
float
heightthe new maximum height of the frame.
local label = DCEI.NewText(DCEI.GetUiRoot())
DCEI.SetMaxSize(label, 100, 48)
local text = "Some text we want to wrap."
DCEI.SetText(label, text)void SetFrameMaxWidth(Transform ui, float width)Sets the maximum width of a frame. The frame will still expand to fit its content if larger than this maximum width.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetFrameMinWidth(frame, 100)
DCEI.SetBackgroundImageColor(frame, 0, 0, 1, 0.5)void SetFrameMaxHeight(Transform ui, float height) {void-SetFrameMaxHeightTransform-ui-float-height}
void SetFrameMaxHeight(Transform ui, float height)Sets the maximum height of a frame. The frame will still expand to fit its content if larger than this maximum height.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetFrameMaxHeight(frame, 100)
DCEI.SetBackgroundImageColor(frame, 0, 0, 1, 0.5)void SetFrameSize(Transform ui, float width, float height) {void-SetFrameSizeTransform-ui-float-width-float-height}
void SetFrameSize(Transform ui, float width, float height)Sets the absolute size of a frame that will not expand/shrink to accommodate its children.
-
Transform
uithe frame to adjust. -
float
widththe new width of the frame. -
float
heightthe new height of the frame.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetSize(frame, 100, 100)
DCEI.SetBackgroundImageColor(frame, 0, 0, 1, 0.5)void SetFrameWidth(Transform ui, float width)void SetFrameHeight(Transform ui, float height)void FlipFrameHorizontal(Transform ui)Flips the given UI frame and its children horizontally. Does not work on the root UI.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.UseImageSizeRatio(frame, 1)
DCEI.FlipHorizontal(frame)void FlipFrameVertical(Transform ui)Flips the given UI frame and its children vertically. Does not work on the root UI.
local frame = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImage(frame, "airship_onMap")
DCEI.UseImageSizeRatio(frame, 1)
DCEI.FlipVertical(frame)void SetFrameMatchParent(Transform ui, bool matchWidth, bool matchHeight) {void-SetFrameMatchParentTransform-ui-bool-matchWidth-bool-matchHeight}
void SetFrameMatchParent(Transform ui, bool matchWidth, bool matchHeight)Sets the dimensions of a UI frame to match that of its parent.
-
Transform
uithe frame to adjust. -
boolean
matchWidthwhether to set the frame's width to that of its parent. -
boolean
matchHeightwhether to set the frame's height to that of its parent.
local fullscreen_mask = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetMatchParent(fullscreen_mask, true, true)
DCEI.SetBackgroundImageColor(fullscreen_mask, 0, 0, 0, 0.5)void SetFramePadding(Transform ui, float padding)Sets the padding for a UI frame.
local frame1 = DCEI.NewFrame(DCEI.GetUiRoot())
DCEI.SetBackgroundImageColor(frame1, 1, 0, 1, 0.4)
DCEI.SetPadding(frame1, 20)
local frame2 = DCEI.NewFrame(frame1)
DCEI.SetSize(frame2, 100, 100)
DCEI.SetBackgroundImageColor(frame2, 0, 1, 1, 0.4)