GuiButton
GuiButton : GuiObject
Overview
GuiButton은 GuiObject를 기반으로 하는 추상 클래스로, TextButton과 ImageButton 등 클릭 가능한 UI 요소의 공통 기능을 정의합니다.
Properties
Methods
Events
Activated
버튼을 누를 때 발생하는 이벤트입니다.
버튼을 클릭하거나 터치한 뒤 해당 UI 요소 위에서 손을 뗄 때 발생하며, 입력이 시작되는 순간이 아닌 입력이 종료되는 시점(Up)에 실행됩니다.
또한, 이 이벤트가 정상적으로 발생하려면 버튼의 Active 속성이 true로 설정되어 있어야 합니다.
Parameters
Code Samples
local ScreenGui = script.Parent
local ImageButton = ScreenGui.ImageButton
local function OnActivated()
print("Activated!")
end
ImageButton.Activated:Connect(OnActivated)
Last updated