TextLabel
TextLabel : GuiObject
Overview
TextLabel์ Frame๊ณผ ๋ฌ๋ฆฌ ์ฌ๊ฐํ ์์ญ์ ํ ์คํธ๋ฅผ ํ์ํ ์ ์๋ UI ์์์ ๋๋ค.
ํ ์คํธ์ ์์์ด๋ ํฌ๋ช ๋ ์กฐ์ ์ TextColor3 ๋ฐ TextTransparency ์์ฑ์ผ๋ก ์ ์ดํ ์ ์์ผ๋ฉฐ, ๋ฐฐ๊ฒฝ์ ์จ๊ธฐ๊ณ ์ด๋ฏธ์ง๋ง ํ์ํ๊ณ ์ถ๋ค๋ฉด BackgroundTransparency๋ฅผ 1๋ก ์ค์ ํ๋ฉด ๋ฉ๋๋ค.
TextLabel์ ํด๋ผ์ด์ธํธ ํ๊ฒฝ์์๋ง ์ ์ดํ ์ ์์ต๋๋ค.
Properties
Bold
bool
TextLabel์ ํ์๋๋ ํ ์คํธ๋ฅผ ๊ตต๊ฒ(Bold) ๋ ๋๋งํ ์ง ์ฌ๋ถ๋ฅผ ์ง์ ํฉ๋๋ค.
Code Samples
local ScreenGui = script.Parent
local TextLabel = ScreenGui:WaitForChild("TextLabel")
TextLabel.Bold = trueText
string
TextLabel์ ํ์ํ ํ ์คํธ ๊ฐ์ ์ง์ ํฉ๋๋ค.
ํ ์คํธ๋ ์์, ํฌ๋ช ๋, ํฌ๊ธฐ, ํฐํธ, ์ ๋ ฌ ๋ฑ์ ๋ค์ํ ์์ฑ์ ์ํด ์๊ฐ์ ์ผ๋ก ํํ๋ฉ๋๋ค.
๋ํ ํธ์ง๊ธฐ(Properties ์ฐฝ)์์๋ Shift + Enter๋ฅผ ์ฌ์ฉํด ์ค๋ฐ๊ฟ์ ์ ๋ ฅํ ์ ์์ผ๋ฉฐ, ์คํฌ๋ฆฝํธ์์๋ \n ๋ฌธ์๋ฅผ ์ฌ์ฉํด ๊ฐํ์ ์ ์ฉํ ์ ์์ต๋๋ค.
Code Samples
TextBounds
Vector2
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
TextColor3
Color3
ํ ์คํธ์ ์ ์ฉ๋๋ ์์์ ์ง์ ํฉ๋๋ค.
Code Samples
TextFits
bool
ํ์ฌ ์ง์๋์ง ์์ต๋๋ค.
Code Samples
TextScaled
bool
ํ ์คํธ๊ฐ TextLabel์ ์ ์ฒด ์์ญ์ ์ฑ์ฐ๋๋ก ์๋์ผ๋ก ํฌ๊ธฐ๋ฅผ ์กฐ์ ํ ์ง ์ฌ๋ถ๋ฅผ ๊ฒฐ์ ํฉ๋๋ค.
์ด ๊ธฐ๋ฅ์ ์ฌ์ฉํ๋ฉด TextSize ๊ฐ์ ๋ฌด์๋๋ฉฐ, TextWrapped๋ ์๋์ผ๋ก ํ์ฑํ๋ฉ๋๋ค.
Code Samples
TextSize
number
ํ ์คํธ์ ํฌ๊ธฐ๋ฅผ Pixel ๋จ์๋ก ์ ์ดํ๋ฉฐ, ๊ฐ์ด ํด์๋ก ํ ์คํธ๊ฐ ๋ ํฌ๊ฒ ํ์๋ฉ๋๋ค.
Code Samples
TextTransparency
number
ํ ์คํธ์ ํฌ๋ช ๋๋ฅผ ์ง์ ํฉ๋๋ค.
0์ ์์ ํ ๋ถํฌ๋ช ์ํ๋ฅผ ์๋ฏธํ๊ณ , 1์ ์ ํ ๋ณด์ด์ง ์๋ ์ํ๋ฅผ ์๋ฏธํฉ๋๋ค.
๋ฐฐ๊ฒฝ์ ์จ๊ธฐ๊ณ ํ ์คํธ๋ง ํ์ํ๊ณ ์ถ๋ค๋ฉด BackgroundTransparency๋ฅผ 1๋ก ์ค์ ํ๋ฉด ๋ฉ๋๋ค.
Code Samples
TextWrapped
bool
TextLabel์ ํ ์คํธ๊ฐ ์์์ ์์ญ์ ๋์ด๊ฐ์ง ์๋๋ก ์๋์ผ๋ก ์ค๋ฐ๊ฟํ ์ง ์ฌ๋ถ๋ฅผ ์ง์ ํฉ๋๋ค.
์ด ์์ฑ์ด true๋ก ์ค์ ๋๋ฉด ๊ธด ๋ฌธ์ฅ์ TextLabel์ ํญ์ ๋ง์ถ์ด ์ฌ๋ฌ ์ค๋ก ๋๋์ด ํ์๋๋ฉฐ, ์ค ๋ถ๋ฆฌ๋ ๊ณต๋ฐฑ ๋ฌธ์๋ฅผ ๊ธฐ์ค์ผ๋ก ์ฒ๋ฆฌ๋ฉ๋๋ค.
Code Samples
TextXAlignment
Enum.TextXAlignment
ํ ์คํธ๊ฐ TextLabel ์์ญ์์ ์ผ์ชฝ, ๊ฐ์ด๋ฐ, ์ค๋ฅธ์ชฝ ์ค ์ด๋์ ๋ฐฐ์น๋ ์ง๋ฅผ ์ง์ ํฉ๋๋ค.
Code Samples
TextYAlignment
Enum.TextYAlignment
ํ ์คํธ๊ฐ TextLabel ์์ญ์์ ์์ชฝ, ๊ฐ์ด๋ฐ, ์๋์ชฝ ์ค ์ด๋์ ๋ฐฐ์น๋ ์ง๋ฅผ ์ง์ ํฉ๋๋ค.
Code Samples
Methods
Events
See also
GUILast updated