Skip to content

Add vide.slider and vide.draggable (reusable slider component + drag action helper)#66

Closed
isarsindri wants to merge 19 commits intocentau:mainfrom
isarsindri:main
Closed

Add vide.slider and vide.draggable (reusable slider component + drag action helper)#66
isarsindri wants to merge 19 commits intocentau:mainfrom
isarsindri:main

Conversation

@isarsindri
Copy link

Adds two reusable UI helpers to Vide:

• vide.slider(props): a first-class slider component built with create, source, action, and cleanup. Supports mouse/touch dragging, track click-to-jump, value quantisation via step, formatting via format, callback via onChanged, and theming (track, fill, knob, stroke, and how rounded the corners are).

• vide.draggable(opts): an action() wrapper that makes any GuiObject draggable using input events (no deprecated Roblox .Draggable). Supports axis constraints (x, y, both) and optional drag callbacks.

Includes documentation:
• API docs for slider and draggable with full props/options reference.
• Updated Components guide showing how to wrap and reuse vide.slider as a component and how to compose it in a menu.

Notes:
• Both modules are wired through lib using injected dependencies to avoid cyclic requires.
• Gamepad support is not included in this PR; a follow-up can add selection-based D-pad/thumbstick adjustments.

image

-- DOES NOT USE DEPRECATED .DRAGGABLE!
Add documentation for draggable() action in 12-actions.md
Added detailed documentation for the draggable function, including options, supported instances, and an example of usage.
Corrected comment formatting in the slider component example.
Updated the components section to improve formatting and clarity.
Removed unnecessary blank line and adjusted code formatting.
Added a nil check for UserInputService to handle non-Roblox environments.
Copy link
Author

@isarsindri isarsindri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fixed error with UIS not including nil for outside of roblox code environments

Copy link
Author

@isarsindri isarsindri left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed UIS error not taking into account for other code environments added "or nil"

Updated UserInputService initialization and added checks for non-Roblox environments and GuiObject types.
@isarsindri isarsindri marked this pull request as draft March 2, 2026 13:43
@isarsindri isarsindri marked this pull request as ready for review March 2, 2026 13:49
@isarsindri isarsindri closed this Mar 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant