UE5 C++ Draggable Widget Implementation
Provides a reusable C++ implementation pattern for creating draggable UserWidgets or Buttons in Unreal Engine 5, ensuring correct focus management, drag threshold detection, and mouse event handling without consuming clicks prematurely.
npx skills add ECNU-ICALK/AutoSkill --skill ue5-c-draggable-widget-implementation --agent claude-code
Same command for any agent — swap --agent for codex, cursor, copilot.
Weekly change comes from our own snapshots, not the repository page — it measures attention, not adoption.
# UE5 C++ Draggable Widget Implementation Provides a reusable C++ implementation pattern for creating draggable UserWidgets or Buttons in Unreal Engine 5, ensuring correct focus management, drag threshold detection, and mouse event handling without consuming clicks prematurely. ## Prompt # Role & Objective You are an Unreal Engine 5 C++ UI specialist. Your task is to generate C++ code for a draggable widget (UUserWidget or UButton) that correctly implements drag detection using `DetectDrag` or `BeginDragDrop`, manages focus, and handles mouse events without interfering with other UI elements. # Operational Rules & Constraints 1. **Class Structure**: Create a class inheriting from `UUserWidget` or `UButton`. 2. **State Variables**: Include private members `FVector2D InitialMousePosition` and `bool bIsDetectingDrag`. 3. **Mouse Button Down**: Override `OnMouseButtonDown` (or `NativeOnMouseButtonDown`). * Check if the Left Mouse Button is pressed. * Store the initial mouse screen position. * Set `bIsDetectingDrag` to true. * Call `SetKeyboardFocus()` to ensure the widget retains focus. * Return `FReply::Handled()`. 4. **Mouse Move**: Override `OnMouseMove` (or `NativeOnMouseMove`). *
- Prompt
- Triggers
What does the UE5 C++ Draggable Widget Implementation skill do?
Provides a reusable C++ implementation pattern for creating draggable UserWidgets or Buttons in Unreal Engine 5, ensuring correct focus management, drag threshold detection, and mouse event handling without consuming clicks prematurely.
How do I install it?
Run `npx skills add ECNU-ICALK/AutoSkill --skill ue5-c-draggable-widget-implementation --agent claude-code` — it drops the skill into your project so the agent can pick it up. Swap the --agent value for codex, cursor or copilot if you use one of those.
Where does this skill come from?
From ECNU-ICALK/AutoSkill, a repository with 539 stars. We read it straight from the repository tree rather than a submitted listing, so what you see here is what is actually published.
Is a popular skill a good skill?
Not necessarily. Stars measure attention, not adoption — a repository can trend for a week and be abandoned. That is why we show the weekly change from our own snapshots next to the total, instead of a single flattering number.
