GuiObjectクラス

クラスInstance.newでは作れない日本語解説は準備中

ひとことで言うと

GuiObjectは、ロブロックス(Roblox)のクラスです。くわしい日本語解説は準備中のため、下に公式の説明(英語)を載せています。

公式の説明(英語):An abstract class for all 2D user interface objects.

クラスの関係

受け継いでいるクラス:Object → Instance → GuiBase → GuiBase2d → GuiObject

このクラスを受け継ぐクラス:CanvasGroup、Frame、GuiButton、GuiLabel、InputActionLabel、ScrollingFrame、TextBox、TextChannelWindow、VideoDisplay、VideoFrame、ViewportFrame

プロパティ(26)

名前と書き方説明
Active
GuiObject.Active: boolean
Determines whether this UI element sinks input.
AnchorPoint
GuiObject.AnchorPoint: Vector2
Determines the origin point of a GuiObject, relative to its absolute size.
AutomaticSize
GuiObject.AutomaticSize: AutomaticSize
Determines whether resizing occurs based on child content.
BackgroundColor3
GuiObject.BackgroundColor3: Color3
Determines the GuiObject background color.
BackgroundTransparency
GuiObject.BackgroundTransparency: float
Determines the transparency of the GuiObject background and border.
BorderColor3
GuiObject.BorderColor3: Color3
Determines the color of the GuiObject border.
BorderMode
GuiObject.BorderMode: BorderMode
Determines in what manner the GuiObject border is laid out relative to its dimensions.
BorderSizePixel
GuiObject.BorderSizePixel: int
Determines the pixel width of the GuiObject border.
ClipsDescendants
GuiObject.ClipsDescendants: boolean
Determines if descendant Class.GuiObject|GuiObjects outside of the bounds of a parent GUI element should render.
GuiState
GuiObject.GuiState: GuiState
Determines whether the player's mouse is being actively pressed on the GuiObject or not.
InputSink
GuiObject.InputSink: InputSink
Controls whether, and how, the GuiObject sinks input that occurs over it.
Interactable
GuiObject.Interactable: boolean
Determines whether the GuiButton can be interacted with or not, or if the Enum.GuiState|GuiState of the GuiObject is changing or not.
LayoutOrder
GuiObject.LayoutOrder: int
Controls the sort order of the GuiObject when used with a UIGridStyleLayout.
NextSelectionDown
GuiObject.NextSelectionDown: GuiObject
Sets the GuiObject which will be selected when the gamepad selector is moved downward.
NextSelectionLeft
GuiObject.NextSelectionLeft: GuiObject
Sets the GuiObject which will be selected when the gamepad selector is moved to the left.
NextSelectionRight
GuiObject.NextSelectionRight: GuiObject
Sets the GuiObject which will be selected when the gamepad selector is moved to the right.
NextSelectionUp
GuiObject.NextSelectionUp: GuiObject
Sets the GuiObject which will be selected when the gamepad selector is moved upward.
Position
GuiObject.Position: UDim2
Determines the pixel and scalar position of the GuiObject.
Rotation
GuiObject.Rotation: float
Determines the number of degrees by which the GuiObject is rotated.
Selectable
GuiObject.Selectable: boolean
Determine whether the GuiObject can be selected by a gamepad.
SelectionImageObject
GuiObject.SelectionImageObject: GuiObject
Overrides the default selection adornment used for gamepads.
SelectionOrder
GuiObject.SelectionOrder: int
The order of Class.GuiObject|GuiObjects selected by the gamepad UI selection.
Size
GuiObject.Size: UDim2
Determines the pixel and scalar size of the GuiObject.
SizeConstraint
GuiObject.SizeConstraint: SizeConstraint
Sets the Class.GuiObject.Size|Size axes that the GuiObject will be based on, relative to the size of its parent.
Visible
GuiObject.Visible: boolean
Determines whether the GuiObject and its descendants will be rendered.
ZIndex
GuiObject.ZIndex: int
Determines the order in which a GuiObject renders relative to others.

イベント(16)

名前と書き方説明
InputBegan
GuiObject.InputBegan(input: InputObject)
Fired when a user begins interacting via a Human-Computer Interface device (Mouse button down, touch begin, keyboard button down, etc).
InputChanged
GuiObject.InputChanged(input: InputObject)
Fired when a user changes how they're interacting via a Human-Computer Interface device (Mouse button down, touch begin, keyboard button down, etc).
InputEnded
GuiObject.InputEnded(input: InputObject)
Fired when a user stops interacting via a Human-Computer Interface device (Mouse button down, touch begin, keyboard button down, etc).
MouseEnter
GuiObject.MouseEnter(x: int, y: int)
Fires when a user moves their mouse into a GUI element.
MouseLeave
GuiObject.MouseLeave(x: int, y: int)
Fires when a user moves their mouse out of a GUI element.
MouseMoved
GuiObject.MouseMoved(x: int, y: int)
Fires whenever a user moves their mouse while it is inside a GUI element.
MouseWheelBackward
GuiObject.MouseWheelBackward(x: int, y: int)
Fires when a user scrolls their mouse wheel back when the mouse is over a GUI element.
MouseWheelForward
GuiObject.MouseWheelForward(x: int, y: int)
Fires when a user scrolls their mouse wheel forward when the mouse is over a GUI element.
SelectionGained
GuiObject.SelectionGained(inputDirection: GuiNavigationDirection)
Fired when the GuiObject is being focused on with the Gamepad selector.
SelectionLost
GuiObject.SelectionLost(inputDirection: GuiNavigationDirection)
Fired when the Gamepad selector stops focusing on the GuiObject.
TouchLongPress
GuiObject.TouchLongPress(touchPositions: Array, state: UserInputState)
Fires when the player starts, continues and stops long-pressing the UI element.
TouchPan
GuiObject.TouchPan(touchPositions: Array, totalTranslation: Vector2, velocity: Vector2, state: UserInputState)
Fires when the player moves their finger on the UI element.
TouchPinch
GuiObject.TouchPinch(touchPositions: Array, scale: float, velocity: float, state: UserInputState)
Fires when the player performs a pinch or pull gesture using two fingers on the UI element.
TouchRotate
GuiObject.TouchRotate(touchPositions: Array, rotation: float, velocity: float, state: UserInputState)
Fires when the player performs a rotation gesture using two fingers on the UI element.
TouchSwipe
GuiObject.TouchSwipe(swipeDirection: SwipeDirection, numberOfTouches: int)
Fires when the player performs a swipe gesture on the UI element.
TouchTap
GuiObject.TouchTap(touchPositions: Array)
Fires when the player performs a tap gesture on the UI element.

受け継いでいるメンバー

GuiBase2d から受け継いでいるもの(11)

AbsolutePosition・AbsoluteRotation・AbsoluteSize・AutoLocalize・RootLocalizationTable・SelectionBehaviorDown・SelectionBehaviorLeft・SelectionBehaviorRight・SelectionBehaviorUp・SelectionGroup・SelectionChanged

Instance から受け継いでいるもの(46)

Archivable・Capabilities・IsInSandbox・Name・Parent・PredictionMode・Sandboxed・AddTag・ClearAllChildren・Clone・Destroy・FindFirstAncestor・FindFirstAncestorOfClass・FindFirstAncestorWhichIsA・FindFirstChild・FindFirstChildOfClass・FindFirstChildWhichIsA・FindFirstDescendant・GetActor・GetAttribute・GetAttributeChangedSignal・GetAttributes・GetChildren・GetDebugId・GetDescendants・GetFullName・GetStyled・GetStyledPropertyChangedSignal・GetTags・HasTag・IsAncestorOf・IsDescendantOf・IsPropertyModified・QueryDescendants・RemoveTag・ResetPropertyToDefault・SetAttribute・WaitForChild・AncestryChanged・AttributeChanged・ChildAdded・ChildRemoved・DescendantAdded・DescendantRemoving・Destroying・StyledPropertiesChanged

Object から受け継いでいるもの(4)

ClassName・GetPropertyChangedSignal・IsA・Changed

英語の説明とメンバーの一覧は、Roblox Creator Documentation(GuiObject)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

執筆:鈴木孝昌官公庁のWeb・システム開発を担当する現役プロジェクトマネージャー。沖縄マイクラ部 クロスウェーブで、ロブロックス(Roblox)・マインクラフト(マイクラ)・Scratchなどのプログラミングを指導。マイクラカップ沖縄代表チームを指導(第6回・第7回、第7回TBS賞)。
沖縄マイクラ部で、子どもたちにロブロックス(Roblox)やマインクラフト(マイクラ)のプログラミングを教えています。プロフィールと編集方針
Instagramで教室の様子を見る
noteで記事を読む