# UIDragDetector(ロブロックス クラス) > Instance which facilitates and encourages interaction with UI elements in an experience. - URL:https://roblox.minecraft-okinawa.com/reference/classes/UIDragDetector/ - 公式:https://create.roblox.com/docs/reference/engine/classes/UIDragDetector - 受け継いでいるクラス:UIComponent ## プロパティ - `UIDragDetector.ActivatedCursorIcon: ContentId`:Sets the cursor icon to display when the mouse is activated over the parent of this UIDragDetector. - `UIDragDetector.ActivatedCursorIconContent: Content`:Sets the cursor icon to display when the mouse is activated over the parent of this UIDragDetector. Only supports asset URIs - `UIDragDetector.BoundingBehavior: UIDragDetectorBoundingBehavior`:Determines bounding behavior of the dragged UI object when the detector's Class.UIDragDetector.BoundingUI|BoundingUI is set. - `UIDragDetector.BoundingUI: GuiBase2d`:Instance whose bounding area defines the drag boundaries for the parent GuiObject. - `UIDragDetector.CursorIcon: ContentId`:Sets the cursor icon to display when the mouse is hovered over the parent of this UIDragDetector. - `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. - `UIDragDetector.DragAxis: Vector2`:The drag axis for the UIDragDetector instance when Class.UIDragDetector.DragStyle|DragStyle is set to UIDragDetectorDragStyle.TranslateLine. - `UIDragDetector.DragRelativity: UIDragDetectorDragRelativity`:Sets the paradigm which defines the relativity of inputs/outputs from a custom drag function. - `UIDragDetector.DragRotation: float`:The rotation performed by the current drag. - `UIDragDetector.DragSpace: UIDragDetectorDragSpace`:Sets the paradigm which defines the space of inputs/outputs from a custom drag function. - `UIDragDetector.DragStyle: UIDragDetectorDragStyle`:The paradigm used to generate proposed motion. - `UIDragDetector.DragUDim2: UDim2`:The translation performed by the current drag expressed in a UDim2 value. - `UIDragDetector.Enabled: boolean`:Whether the UIDragDetector responds to user input. - `UIDragDetector.MaxDragAngle: float`:Along with Class.UIDragDetector.MinDragAngle|MinDragAngle, impedes the detector's attempts to generate rotational motion. - `UIDragDetector.MaxDragTranslation: UDim2`:Along with Class.UIDragDetector.MinDragTranslation|MinDragTranslation, impedes the detector's attempts to generate linear/planar motion. - `UIDragDetector.MinDragAngle: float`:Along with Class.UIDragDetector.MaxDragAngle|MaxDragAngle, impedes the detector's attempts to generate rotational motion. - `UIDragDetector.MinDragTranslation: UDim2`:Along with Class.UIDragDetector.MaxDragTranslation|MaxDragTranslation, impedes the detector's attempts to generate linear/planar motion. - `UIDragDetector.ReferenceUIInstance: GuiObject`:A GuiObject instance whose local space and absolute center position is the reference space and origin for the detector. - `UIDragDetector.ResponseStyle: UIDragDetectorResponseStyle`:The paradigm used to define the response to proposed motion. - `UIDragDetector.SelectionModeDragSpeed: UDim2`:Maximum drag speed for translation. - `UIDragDetector.SelectionModeRotateSpeed: float`:Maximum angle per second the UIDragDetector can rotate at. - `UIDragDetector.UIDragSpeedAxisMapping: UIDragSpeedAxisMapping`:UIDragSpeedAxisMapping value that determines the **X**/**Y** dimension dragging speeds. ## メソッド - `UIDragDetector:AddConstraintFunction(priority: int, function: Function): RBXScriptConnection`:Adds a function to modify or constrain proposed motion. - `UIDragDetector:GetReferencePosition(): UDim2`:Returns the reference UDim2 position of the current drag's reference origin. - `UIDragDetector:GetReferenceRotation(): float`:Returns the reference rotation of the current drag's reference element. - `UIDragDetector:SetDragStyleFunction(function: Function): ()`:Passes a function to be used if and only if Class.UIDragDetector.DragStyle|DragStyle is set to UIDragDetectorDragStyle.Scriptable. ## イベント - `UIDragDetector.DragContinue(inputPosition: Vector2)`:Fires when a user continues dragging the UI element after Class.UIDragDetector.DragStart|DragStart has been initiated. - `UIDragDetector.DragEnd(inputPosition: Vector2)`:Fires when a user stops dragging the UI element. - `UIDragDetector.DragStart(inputPosition: Vector2)`:Fires when a user starts dragging the UI element. 英語の説明とメンバー一覧:Roblox Creator Documentation(CC BY 4.0)。日本語の解説はこのサイト独自のものです。 執筆:鈴木孝昌(現役プロジェクトマネージャー/プログラミング講師)/運営:沖縄マイクラ部 プログラミングスクール「クロスウェーブ」(https://minecraft-okinawa.com/)