UIDragDetectorクラス

クラス日本語解説は準備中

ひとことで言うと

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

公式の説明(英語):Instance which facilitates and encourages interaction with UI elements in an experience.

クラスの関係

受け継いでいるクラス:Object → Instance → UIBase → UIComponent → UIDragDetector

プロパティ(22)

名前と書き方説明
ActivatedCursorIcon
UIDragDetector.ActivatedCursorIcon: ContentId
Sets the cursor icon to display when the mouse is activated over the parent of this UIDragDetector.
ActivatedCursorIconContent
UIDragDetector.ActivatedCursorIconContent: Content
Sets the cursor icon to display when the mouse is activated over the parent of this UIDragDetector. Only supports asset URIs
BoundingBehavior
UIDragDetector.BoundingBehavior: UIDragDetectorBoundingBehavior
Determines bounding behavior of the dragged UI object when the detector's Class.UIDragDetector.BoundingUI|BoundingUI is set.
BoundingUI
UIDragDetector.BoundingUI: GuiBase2d
Instance whose bounding area defines the drag boundaries for the parent GuiObject.
CursorIcon
UIDragDetector.CursorIcon: ContentId
Sets the cursor icon to display when the mouse is hovered over the parent of this UIDragDetector.
CursorIconContent
UIDragDetector.CursorIconContent: Content
Sets the cursor icon to display when the mouse is hovered over the parent of this UIDragDetector. Only asset URIs are supported.
DragAxis
UIDragDetector.DragAxis: Vector2
The drag axis for the UIDragDetector instance when Class.UIDragDetector.DragStyle|DragStyle is set to UIDragDetectorDragStyle.TranslateLine.
DragRelativity
UIDragDetector.DragRelativity: UIDragDetectorDragRelativity
Sets the paradigm which defines the relativity of inputs/outputs from a custom drag function.
DragRotation
UIDragDetector.DragRotation: float
The rotation performed by the current drag.
DragSpace
UIDragDetector.DragSpace: UIDragDetectorDragSpace
Sets the paradigm which defines the space of inputs/outputs from a custom drag function.
DragStyle
UIDragDetector.DragStyle: UIDragDetectorDragStyle
The paradigm used to generate proposed motion.
DragUDim2
UIDragDetector.DragUDim2: UDim2
The translation performed by the current drag expressed in a UDim2 value.
Enabled
UIDragDetector.Enabled: boolean
Whether the UIDragDetector responds to user input.
MaxDragAngle
UIDragDetector.MaxDragAngle: float
Along with Class.UIDragDetector.MinDragAngle|MinDragAngle, impedes the detector's attempts to generate rotational motion.
MaxDragTranslation
UIDragDetector.MaxDragTranslation: UDim2
Along with Class.UIDragDetector.MinDragTranslation|MinDragTranslation, impedes the detector's attempts to generate linear/planar motion.
MinDragAngle
UIDragDetector.MinDragAngle: float
Along with Class.UIDragDetector.MaxDragAngle|MaxDragAngle, impedes the detector's attempts to generate rotational motion.
MinDragTranslation
UIDragDetector.MinDragTranslation: UDim2
Along with Class.UIDragDetector.MaxDragTranslation|MaxDragTranslation, impedes the detector's attempts to generate linear/planar motion.
ReferenceUIInstance
UIDragDetector.ReferenceUIInstance: GuiObject
A GuiObject instance whose local space and absolute center position is the reference space and origin for the detector.
ResponseStyle
UIDragDetector.ResponseStyle: UIDragDetectorResponseStyle
The paradigm used to define the response to proposed motion.
SelectionModeDragSpeed
UIDragDetector.SelectionModeDragSpeed: UDim2
Maximum drag speed for translation.
SelectionModeRotateSpeed
UIDragDetector.SelectionModeRotateSpeed: float
Maximum angle per second the UIDragDetector can rotate at.
UIDragSpeedAxisMapping
UIDragDetector.UIDragSpeedAxisMapping: UIDragSpeedAxisMapping
UIDragSpeedAxisMapping value that determines the **X**/**Y** dimension dragging speeds.

メソッド(4)

名前と書き方説明
AddConstraintFunction
UIDragDetector:AddConstraintFunction(priority: int, function: Function): RBXScriptConnection
Adds a function to modify or constrain proposed motion.
GetReferencePosition
UIDragDetector:GetReferencePosition(): UDim2
Returns the reference UDim2 position of the current drag's reference origin.
GetReferenceRotation
UIDragDetector:GetReferenceRotation(): float
Returns the reference rotation of the current drag's reference element.
SetDragStyleFunction
UIDragDetector:SetDragStyleFunction(function: Function): ()
Passes a function to be used if and only if Class.UIDragDetector.DragStyle|DragStyle is set to UIDragDetectorDragStyle.Scriptable.

イベント(3)

名前と書き方説明
DragContinue
UIDragDetector.DragContinue(inputPosition: Vector2)
Fires when a user continues dragging the UI element after Class.UIDragDetector.DragStart|DragStart has been initiated.
DragEnd
UIDragDetector.DragEnd(inputPosition: Vector2)
Fires when a user stops dragging the UI element.
DragStart
UIDragDetector.DragStart(inputPosition: Vector2)
Fires when a user starts dragging the UI element.

受け継いでいるメンバー

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(UIDragDetector)をもとにしています(CC BY 4.0)。日本語の解説は、このサイトで独自に書いたものです。

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