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