Trigger API Reference DCEI Functions Custom UI2 - funovus/editor-wiki GitHub Wiki
Table of Contents
- [Trigger API Reference\DCEI Functions\Custom UI (3/8)](#trigger-api-referencedcei-functionscustom-ui-38)
* [float GetScrollFrameScrollPosition(Transform ui)](#float-getscrollframescrollpositiontransform-ui)
* [void SetScrollFrameScrollPosition2D(Transform ui, Float2 position)](#void-setscrollframescrollposition2dtransform-ui-float2-position)
* [Float2 GetScrollFrameScrollPosition2D(Transform ui)](#float2-getscrollframescrollposition2dtransform-ui)
* [void SetScrollFrameScrollInertia(Transform ui, bool value)](#void-setscrollframescrollinertiatransform-ui-bool-value)
* [void SetScrollFrameSCrollEnable(Transform ui, bool value)](#void-setscrollframescrollenabletransform-ui-bool-value)
* [void SetScrollFrameScrollEnable(Transform ui, bool value)](#void-setscrollframescrollenabletransform-ui-bool-value)
* [void SetScrollFrameScrollDecelerationRate(Transform ui, float value)](#void-setscrollframescrolldecelerationratetransform-ui-float-value)
* [void SetScrollFrameScrollContentAlignment(Transform ui, string value)](#void-setscrollframescrollcontentalignmenttransform-ui-string-value)
* [void SetTextFrameRtlSupport(Transform text, bool value)](#void-settextframertlsupporttransform-text-bool-value)
* [void SetTextFrameAlignment(Transform text, string alignment)](#void-settextframealignmenttransform-text-string-alignment)
* [void SetTextFrameWrapping(Transform text, bool enable)](#void-settextframewrappingtransform-text-bool-enable)
* [void SetTextFrameOverflow(Transform text, bool enable)](#void-settextframeoverflowtransform-text-bool-enable)
* [void SetTextFrameText(Transform text, string content)](#void-settextframetexttransform-text-string-content)
* [void SetTextFrameTextExpression(Transform text, string content)](#void-settextframetextexpressiontransform-text-string-content)
* [void SetTextFrameFontSize(Transform text, float size)](#void-settextframefontsizetransform-text-float-size)
* [void SetTextFrameFontSizeMin(Transform text, float size)](#void-settextframefontsizemintransform-text-float-size)
* [void SetTextFrameFontSizeMax(Transform text, float size)](#void-settextframefontsizemaxtransform-text-float-size)
* [void SetTextFrameColor(Transform text, ColorRGB color)](#void-settextframecolortransform-text-colorrgb-color)
* [void SetTextFrameColorRGB(Transform text, ColorRGB color)](#void-settextframecolorrgbtransform-text-colorrgb-color)
* [void SetTextFrameOutline(Transform text, bool outline)](#void-settextframeoutlinetransform-text-bool-outline)
* [void SetTextFrameShadow(Transform text, bool enableShadow)](#void-settextframeshadowtransform-text-bool-enableshadow)
* [void SetTextFrameOutlineOutside(Transform text, bool outside)](#void-settextframeoutlineoutsidetransform-text-bool-outside)
* [void SetTextFrameOutlineColor(Transform text, ColorRGBA color)](#void-settextframeoutlinecolortransform-text-colorrgba-color)
* [void SetTextFrameOutlineColorRGBA(Transform text, ColorRGBA color)](#void-settextframeoutlinecolorrgbatransform-text-colorrgba-color)
* [void SetTextFrameOutlineWidth(Transform text, float width)](#void-settextframeoutlinewidthtransform-text-float-width)
* [void SetTextFrameOutlineSoftness(Transform text, float softness)](#void-settextframeoutlinesoftnesstransform-text-float-softness)
* [void SetTextFrameShadowWidth(Transform text, float width)](#void-settextframeshadowwidthtransform-text-float-width)
* [void SetTextFrameShadowColor(Transform text, ColorRGBA color)](#void-settextframeshadowcolortransform-text-colorrgba-color)
* [void SetTextFrameShadowColorRGBA(Transform text, ColorRGBA color)](#void-settextframeshadowcolorrgbatransform-text-colorrgba-color)
* [void SetTextFrameShadowSoftness(Transform text, float softness)](#void-settextframeshadowsoftnesstransform-text-float-softness)
|
Trigger API Reference\DCEI Functions\Custom UI (3/8) {Trigger-API-ReferenceDCEI-FunctionsCustom-UI-38}
- 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 (4/4)
float GetScrollFrameScrollPosition(Transform ui)
Returns the position of a scroll frame.
local vscroll_frame = DCEI.NewVScroll(DCEI.GetUiRoot())
DCEI.SetSize(vscroll_frame, 200, 300)
DCEI.SetBackgroundImageColor(vscroll_frame, 1, 0, 0, 0.3)
DCEI.SetScrollPosition(vscroll_frame, 300)
local content = DCEI.GetScrollContent(vscroll_frame)
local frame1 = DCEI.NewFrame(content)
DCEI.SetSize(frame1, 150, 400)
DCEI.SetBackgroundImageColor(frame1, 1, 0, 0, 1)
local frame2 = DCEI.NewFrame(content)
DCEI.SetSize(frame2, 150, 400)
DCEI.SetBackgroundImageColor(frame2, 0, 0, 1, 1)
local scroll_pos = DCEI.GetScrollPosition(vscroll_frame)
DCEI.LogMessage(scroll_pos)
void SetScrollFrameScrollPosition2D(Transform ui, Float2 position) {void-SetScrollFrameScrollPosition2DTransform-ui-Float2-position}
void SetScrollFrameScrollPosition2D(Transform ui, Float2 position)
Sets the position of a Scroll frame.
-
Transform
ui
the scroll frame (not the scroll content frame). -
Float2
position
the new scroll position.
local scroll = DCEI.NewScroll(DCEI.GetUiRoot())
DCEI.SetSize(scroll, 500, 500)
DCEI.SetBackgroundImageColor(scroll, 1, 0, 0, 0.3)
local content = DCEI.GetScrollContent(scroll)
local big_content = DCEI.NewFrame(content)
DCEI.SetSize(big_content, 1000, 1000)
DCEI.SetBackgroundImageColor(big_content, 0, 0, 1, 0.4)
local small_content = DCEI.NewFrame(content)
DCEI.SetSize(small_content, 100, 100)
DCEI.SetBackgroundImageColor(small_content, 0, 1, 0, 0.4)
DCEI.SetScrollPosition2D(scroll, {x = 0, y = 500})
Float2 GetScrollFrameScrollPosition2D(Transform ui) {Float2-GetScrollFrameScrollPosition2DTransform-ui}
Float2 GetScrollFrameScrollPosition2D(Transform ui)
Returns the position of a Scroll frame.
local scroll = DCEI.NewScroll(DCEI.GetUiRoot())
DCEI.SetSize(scroll, 500, 500)
DCEI.SetBackgroundImageColor(scroll, 1, 0, 0, 0.3)
local content = DCEI.GetScrollContent(scroll)
local big_content = DCEI.NewFrame(content)
DCEI.SetSize(big_content, 1000, 1000)
DCEI.SetBackgroundImageColor(big_content, 0, 0, 1, 0.4)
local small_content = DCEI.NewFrame(content)
DCEI.SetSize(small_content, 100, 100)
DCEI.SetBackgroundImageColor(small_content, 0, 1, 0, 0.4)
DCEI.SetScrollPosition2D(scroll, {x = 0, y = 500})
local scroll_pos = DCEI.GetScrollPosition2D(scroll)
DCEI.LogMessage("Scroll X position: " .. scroll_pos.x .. "\nScroll Y position: " .. scroll_pos.y)
void SetScrollFrameScrollInertia(Transform ui, bool value) {void-SetScrollFrameScrollInertiaTransform-ui-bool-value}
void SetScrollFrameScrollInertia(Transform ui, bool value)
Sets the inertia for a scroll frame. This is supported for all scroll frame types.
-
Transform
ui
the scroll frame (not the scroll content frame). -
bool
value
if true, the frame's content will decelerate instead of stopping when scrolling stops. This is true by default for newly created scroll frames.
local scroll = DCEI.NewScroll(DCEI.GetUiRoot())
DCEI.SetSize(scroll, 500, 500)
DCEI.SetBackgroundImageColor(scroll, 1, 0, 0, 0.3)
DCEI.SetScrollInertia(scroll, false)
local content = DCEI.GetScrollContent(scroll)
local big_content = DCEI.NewFrame(content)
DCEI.SetSize(big_content, 1000, 1000)
DCEI.SetBackgroundImageColor(big_content, 0, 0, 1, 0.4)
local small_content = DCEI.NewFrame(content)
DCEI.SetSize(small_content, 100, 100)
DCEI.SetBackgroundImageColor(small_content, 0, 1, 0, 0.4)
void SetScrollFrameSCrollEnable(Transform ui, bool value) {void-SetScrollFrameSCrollEnableTransform-ui-bool-value}
void SetScrollFrameSCrollEnable(Transform ui, bool value)
see SetScrollFrameScrollEnable
void SetScrollFrameScrollEnable(Transform ui, bool value) {void-SetScrollFrameScrollEnableTransform-ui-bool-value}
void SetScrollFrameScrollEnable(Transform ui, bool value)
Sets whether scrolling is enabled. This is supported for all scroll frame types.
-
Transform
ui
the scroll frame (not the scroll content frame). -
bool
value
if true, enables scrolling for the scroll element. This is true by default for newly created scroll frames.
local scroll = DCEI.NewScroll(DCEI.GetUiRoot())
DCEI.SetSize(scroll, 500, 500)
DCEI.SetBackgroundImageColor(scroll, 1, 0, 0, 0.3)
DCEI.SetEnableScroll(scroll, false)
local content = DCEI.GetScrollContent(scroll)
local big_content = DCEI.NewFrame(content)
DCEI.SetSize(big_content, 1000, 1000)
DCEI.SetBackgroundImageColor(big_content, 0, 0, 1, 0.4)
local small_content = DCEI.NewFrame(content)
DCEI.SetSize(small_content, 100, 100)
DCEI.SetBackgroundImageColor(small_content, 0, 1, 0, 0.4)
void SetScrollFrameScrollDecelerationRate(Transform ui, float value) {void-SetScrollFrameScrollDecelerationRateTransform-ui-float-value}
void SetScrollFrameScrollDecelerationRate(Transform ui, float value)
Sets the deceleration rate for scroll inertia. A value of 0 will cause instant deceleration (equivalent to setting the inertia to false). Values between 0 and 1 will cause deceleration. A value of 1 will cause no deceleration. A value greater than 1 will cause acceleration. A negative value will break the scroll element. This is supported for all scroll frame types.
-
Transform
ui
the scroll frame (not the scroll content frame). -
float
value
the scroll deceleration rate.
local scroll = DCEI.NewScroll(DCEI.GetUiRoot())
DCEI.SetSize(scroll, 500, 500)
DCEI.SetBackgroundImageColor(scroll, 1, 0, 0, 0.3)
DCEI.SetScrollDecelerationRate(scroll, 0.5)
local content = DCEI.GetScrollContent(scroll)
local big_content = DCEI.NewFrame(content)
DCEI.SetSize(big_content, 1000, 1000)
DCEI.SetBackgroundImageColor(big_content, 0, 0, 1, 0.4)
local small_content = DCEI.NewFrame(content)
DCEI.SetSize(small_content, 100, 100)
DCEI.SetBackgroundImageColor(small_content, 0, 1, 0, 0.4)
- NewHScroll()
- NewVScroll()
- NewScroll()
- [SetScrollInertia()](https://github.com/funovus/editor-wiki/wiki/Trigger-API-Reference-DCEI-Functions-Custom-UI1#setscrollinertia
void SetScrollFrameScrollContentAlignment(Transform ui, string value) {void-SetScrollFrameScrollContentAlignmentTransform-ui-string-value}
void SetScrollFrameScrollContentAlignment(Transform ui, string value)
Sets the alignment for scroll content. The value determines where the initial display location of the scroll content is.
-
Transform
ui
the scroll frame (not the scroll content frame). -
string
value
the alignment. Possible values:
HScroll: left (default), right
VScroll: top (default), bottom
Scroll: left, right, top, bottom, (top|bottom)-(left|right)
local vscroll_frame = DCEI.NewVScroll(DCEI.GetUiRoot())
DCEI.SetSize(vscroll_frame, 200, 500)
DCEI.SetScrollContentAlignment(vscroll_frame, "right")
void SetTextFrameRtlSupport(Transform text, bool value) {void-SetTextFrameRtlSupportTransform-text-bool-value}
void SetTextFrameRtlSupport(Transform text, bool value)
Sets RTL (right to left) support for a text frame. When true, this text will be displayed from right-to-left when using RTL languages (such as Arabic). You typically want to disable this for numeric text, which is still displayed as left-to-right in such languages. This is enabled by default on all text frames.
local text_frame = DCEI.NewText(DCEI.GetUiRoot())
DCEI.SetTextRtlSupport(text_frame, false)
void SetTextFrameAlignment(Transform text, string alignment) {void-SetTextFrameAlignmentTransform-text-string-alignment}
void SetTextFrameAlignment(Transform text, string alignment)
Sets the text alignment for a text frame.
-
Transform
text
the text frame. -
string
alignment
the text alignment. Possible values:
start, end, top, bottom, (top|bottom)-(start|end)
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.SetTextAlignment(text_frame, "end")
void SetTextFrameWrapping(Transform text, bool enable) {void-SetTextFrameWrappingTransform-text-bool-enable}
void SetTextFrameWrapping(Transform text, bool enable)
Sets text wrapping for a text frame.
-
Transform
text
the text frame. -
bool
enable
if true, enables text wrapping. This is true by default for newly created text frames.
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.SetTextWrapping(text_frame, false)
void SetTextFrameOverflow(Transform text, bool enable) {void-SetTextFrameOverflowTransform-text-bool-enable}
void SetTextFrameOverflow(Transform text, bool enable)
Sets text overflow for a text frame.
-
Transform
text
the text frame. -
bool
enable
if true, enables text overflow. This is true by default for newly created text frames.
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 Overflow Example")
DCEI.SetSize(text_frame, 200, 40)
DCEI.SetTextOverflow(text_frame, false)
void SetTextFrameText(Transform text, string content) {void-SetTextFrameTextTransform-text-string-content}
void SetTextFrameText(Transform text, string content)
Sets the text of a text frame. Supports rich text tags (see: http://digitalnativestudios.com/textmeshpro/docs/rich-text/). Use \n
for newline.
-
Transform
text
the text frame to set the text of. -
string
content
the text to set. Supports rich text.
local text = "Here's some <b>RICH</b> text!" .. "\n" ..
"And here's some <size=50%>small</size> text." .. "\n" ..
"<color=blue>And here's some blue text.</color>"
local label = DCEI.NewText(DCEI.GetUiRoot())
DCEI.SetText(label, text)
void SetTextFrameTextExpression(Transform text, string content) {void-SetTextFrameTextExpressionTransform-text-string-content}
void SetTextFrameTextExpression(Transform text, string content)
Sets a text expression in a text frame. Unlike other UI expressions, text expressions must be surrounded with curly brackets {}
. These brackets are used so the expression string can be concatenated with regular text.
-
Transform
text
the text frame to set the text of. -
string
content
the text to set. Supports the following parameters from bound units:
unit.Info.Icon
unit.Info.Name
unit.Health.Current
unit.Health.Max
unit.Health.Percentage
unit.Health.Fraction
unit.Health.Regeneration
unit.Shield.Current
unit.Shield.Max
unit.Shield.Percentage
unit.Shield.Fraction
unit.Shield.Regeneration
unit.Mana.Current
unit.Mana.Max
unit.Mana.Percentage
unit.Mana.Fraction
unit.Mana.Regeneration
unit.Ability.ability_name.CooldownRatio
unit.Ability.ability_name.MaxCharge
unit.Ability.ability_name.ChargeCount
unit.Expression.some_named_expression
Data bound values can be formatted to specific decimal values by appending the expression such as :F2
.
(You can find more documentation here)
-- unit binding for expressions
local unit = DCEI.CreateUnit(1, 1, "Standard MeleeUnit", 16, 16, 0, -1)
DCEI.BindUnit("selected", unit)
local stats = {}
local vstack = DCEI.NewVStack(DCEI.GetUiRoot())
stats.health_label = DCEI.NewText(vstack)
stats.mana_regen_label = DCEI.NewText(vstack)
-- make it so that the healthbar shows <current HP>/<max HP>
DCEI.SetTextExpression(stats.health_label, "{selected.Health.Current}/{selected.Health.Max}")
-- assuming the selected unit's mana regeneration is 1.228
-- this expression will display 1.2
DCEI.SetTextExpression(stats.mana_regen_label, "{selected.Mana.Regeneration:F1}")
-- this expression will display 1.23
DCEI.SetTextExpression(stats.mana_regen_label, "{selected.Mana.Regeneration:F2}")
-- data binding for expressions
local data_table = {text = "data bound label"}
DCEI.BindData("data", data_table)
local data_binding = DCEI.NewText(vstack)
DCEI.SetTextExpression(data_binding, "{data.text}")
DreamEditor also provides an additional specifier :K
to format huge numbers as "xxxK", "xxxM" or "xxxB". The default parameter for :K
is :K2
.
-- assuming the selected unit's max health is 1000000
-- this expression will display 1M
DCEI.SetTextExpression(stats.health_label, "{selected.Health.Max:K0}")
-- this expression will display 1.0M
DCEI.SetTextExpression(stats.health_label, "{selected.Health.Max:K1}")
void SetTextFrameFontSize(Transform text, float size) {void-SetTextFrameFontSizeTransform-text-float-size}
void SetTextFrameFontSize(Transform text, float size)
Sets the font size for a text frame. The default font size is 22.
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)
void SetTextFrameFontSizeMin(Transform text, float size) {void-SetTextFrameFontSizeMinTransform-text-float-size}
void SetTextFrameFontSizeMin(Transform text, float size)
Sets a minimum font size for a text frame. To enable dynamic font sizing, a text frame needs a minium and maximum font size and either a maximum height or width. Does not work if there is a set font size.
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.SetTextFontSizeMin(text_frame, 10)
DCEI.SetTextFontSizeMax(text_frame, 30)
DCEI.SetSize(text_frame, 50, 30)
void SetTextFrameFontSizeMax(Transform text, float size) {void-SetTextFrameFontSizeMaxTransform-text-float-size}
void SetTextFrameFontSizeMax(Transform text, float size)
Sets a maximum font size for a text frame. To enable dynamic font sizing, a text frame needs a minium and maximum font size and either a maximum height or width. Does not work if there is a set font size.
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.SetTextFontSizeMin(text_frame, 10)
DCEI.SetTextFontSizeMax(text_frame, 30)
DCEI.SetSize(text_frame, 100, 30)
void SetTextFrameColor(Transform text, ColorRGB color) {void-SetTextFrameColorTransform-text-ColorRGB-color}
void SetTextFrameColor(Transform text, ColorRGB color)
Sets the color of text for a text frame.
-
Transform
text
the text frame. -
ColorRGB
color
the RGB values for the line.
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.SetTextFrameColor(text_frame, {r = 0.5, g = 0.5, b = 0})
void SetTextFrameColorRGB(Transform text, ColorRGB color) {void-SetTextFrameColorRGBTransform-text-ColorRGB-color}
void SetTextFrameColorRGB(Transform text, ColorRGB color)
Sets the color of text for a text frame.
-
Transform
text
the text frame. -
ColorRGB
color
the RGB values for the line.
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.SetTextFrameColorRGB(text_frame, {r = 0.5, g = 0.5, b = 0})
void SetTextFrameOutline(Transform text, bool outline) {void-SetTextFrameOutlineTransform-text-bool-outline}
void SetTextFrameOutline(Transform text, bool outline)
Sets the outline for a text frame's text.
-
Transform
text
the text frame. -
bool
outline
if true, enables the text outline. This is true by default for newly created text frames.
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.SetTextOutline(text_frame, false)
void SetTextFrameShadow(Transform text, bool enableShadow) {void-SetTextFrameShadowTransform-text-bool-enableShadow}
void SetTextFrameShadow(Transform text, bool enableShadow)
Sets the shadow for a text frame's text. Disabling the text shadow will also disable the outline.
-
Transform
text
the text frame. -
bool
enableShadow
if true, enables the text shadow. This is true by default for newly created text frames.
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.SetTextShadow(text_frame, false)
void SetTextFrameOutlineOutside(Transform text, bool outside) {void-SetTextFrameOutlineOutsideTransform-text-bool-outside}
void SetTextFrameOutlineOutside(Transform text, bool outside)
Sets the outline for a text frame's text.
-
Transform
text
the text frame. -
bool
outside
if true, enables the text's outside outline. This is true by default for newly created text frames.
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.SetTextOutlineOutside(text_frame, false)
void SetTextFrameOutlineColor(Transform text, ColorRGBA color) {void-SetTextFrameOutlineColorTransform-text-ColorRGBA-color}
void SetTextFrameOutlineColor(Transform text, ColorRGBA color)
Sets the outline color for a text frame's text.
-
Transform
text
the text frame. -
ColorRGBA
color
the RGBA values for the line.
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.SetTextFrameOutlineColor(text_frame, {r = 0.5, g = 0.5, b = 0, a = 0.5})
void SetTextFrameOutlineColorRGBA(Transform text, ColorRGBA color) {void-SetTextFrameOutlineColorRGBATransform-text-ColorRGBA-color}
void SetTextFrameOutlineColorRGBA(Transform text, ColorRGBA color)
Sets the outline color for a text frame's text.
-
Transform
text
the text frame. -
ColorRGBA
color
the RGBA values for the line.
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.SetTextFrameOutlineColorRGBA(text_frame, {r = 0.5, g = 0.5, b = 0, a = 0.5})
void SetTextFrameOutlineWidth(Transform text, float width) {void-SetTextFrameOutlineWidthTransform-text-float-width}
void SetTextFrameOutlineWidth(Transform text, float width)
Sets the width for a text frame's text outline.
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.SetTextOutlineWidth(text_frame, 10)
void SetTextFrameOutlineSoftness(Transform text, float softness) {void-SetTextFrameOutlineSoftnessTransform-text-float-softness}
void SetTextFrameOutlineSoftness(Transform text, float softness)
Set the softness for a text frame's text outline.
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.SetTextOutlineSoftness(text_frame, 0.5)
void SetTextFrameShadowWidth(Transform text, float width) {void-SetTextFrameShadowWidthTransform-text-float-width}
void SetTextFrameShadowWidth(Transform text, float width)
Sets the width for a text frame's text shadow.
-
Transform
text
the text frame. -
float
width
the width of the shadow. A value of -1 will remove the shadow without removing the outline.
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.SetTextShadowWidth(text_frame, 10)
void SetTextFrameShadowColor(Transform text, ColorRGBA color) {void-SetTextFrameShadowColorTransform-text-ColorRGBA-color}
void SetTextFrameShadowColor(Transform text, ColorRGBA color)
-
Transform
text
the text frame. -
ColorRGBA
color
the RGBA values for the line.
Sets the color for a text frame's text shadow.
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.SetTextFrameShadowColor(text_frame, {r = 0.5, g = 0.5, b = 0, a = 0.5})
void SetTextFrameShadowColorRGBA(Transform text, ColorRGBA color) {void-SetTextFrameShadowColorRGBATransform-text-ColorRGBA-color}
void SetTextFrameShadowColorRGBA(Transform text, ColorRGBA color)
-
Transform
text
the text frame. -
ColorRGBA
color
the RGBA values for the line.
Sets the color for a text frame's text shadow.
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.SetTextFrameShadowColorRGBA(text_frame, {r = 0.5, g = 0.5, b = 0, a = 0.5})
void SetTextFrameShadowSoftness(Transform text, float softness) {void-SetTextFrameShadowSoftnessTransform-text-float-softness}
void SetTextFrameShadowSoftness(Transform text, float softness)
Set the softness for a text frame's text shadow.
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.SetTextShadowSoftness(text_frame, 1)