{"id":"aerodymier/slidermodule","name":"slidermodule","scope":"aerodymier","platform":"roblox","description":"Slider module for making sliders. Repo link: https://github.com/Aerodymier/SliderModule","version":"0.2.4","latest":"0.2.4","versions":["0.2.2","0.2.3","0.2.4"],"license":"MIT","licenseRating":"safe","licenseCaveats":["License identified from the packaged LICENSE file; the manifest declared none."],"licenseVerified":true,"dependencies":{},"integrity":"d3cfc06b3244aab4591cc86d299e831d6ff0aba5327d6fed1546be551c56d121","likes":0,"downloads":0,"install":"forest install aerodymier/slidermodule","url":"https://forest.dev/p/roblox/aerodymier/slidermodule","files":"https://api.forest.dev/ai/package/roblox/aerodymier/slidermodule/files","readme":"# SliderModule\r\nThis is a module I made for slider GUIs which works with scale instead of the widely used offset.\r\n\r\n# Getting Started\r\n\r\n## Installation\r\nYou can get the module with copying the module from src/shared or you can use Wally to get the module:\r\n\r\nAdd this to your [dependencies]:\r\n\r\n```\r\nSliderModule = \"aerodymier/slidermodule@^0.2.4\"\r\n```\r\n\r\n... or just get it from Roblox creator marketplace (might be out of date):\r\n\r\nhttps://www.roblox.com/library/10138561854/SliderModule\r\n\r\nIf you want to use Roblox Studio in your project I recommend downloading the module file on Releases tab.\r\n\r\n## Usage\r\nYou can create a new Slider instance with ``SliderModule.new()``:\r\n\r\n```lua\r\nlocal newSlider = SliderModule.new(slidingBase, sliderMarker, sliderButton, \r\n{\r\n    min = min,\r\n    max = max,\r\n    snapFactor = snapFactor,\r\n}, \r\n{\r\n    TextBox = valueText,\r\n    DefaultValue = defaultValue,\r\n})\r\n```\r\n\r\n``slidingBase`` is the frame slider head will slide on. (Type: Frame) (Required)\r\n\r\n``sliderMarker`` is the slider head. (Type: Frame) (Required)\r\n\r\n``sliderButton`` is the button which needs to be parented to the slideMarker. (Type: TextButton or ImageButton) (Required)\r\n\r\nFourth variable is ``sliderConfigurations``. This one has to have ``min``, ``max``, ``snapFactor`` values. (All required)\r\n\r\n- ``min``: Minimum value of your slider. (Type: number)\r\n- ``max``: Maximum value of your slider. (Type: number)\r\n- ``snapFactor``: Step value between 0 and 1. (Type: number)\r\n\r\nFifth variable is ``extras``. This one can have a ``TextBox`` or a ``TextLabel`` value. (Not required)\r\n\r\n- ``TextLabel``: The TextLabel which will get updated when value changes. Has priority over ``TextBox`` on displaying values. (Type: TextLabel)\r\n- ``TextBox``: If you want the player to set a custom value between ``min`` and ``max`` values manually, use this. This applies the user specified value to ``self.CurrentValue`` when focus is lost from the TextBox with also moving the marker to the suitable location. Has required checks for number entries. If a ``TextLabel`` is not specified, this will get used on displaying values. (Type: TextBox)\r\n- ``Decimals``: The decimals you want to show in the slider ``TextLabel`` or ``TextBox``. Defaults to 1. (Type: number)\r\n- ``DefaultValue``: The default value you want to set to slider. This will automatically place the slider head to the target value and the TextLabel or TextBox if available. Will be set after Slider:Activate() gets called. (Type: number)\r\n\r\nThere are some functions on ``Slider`` object.\r\n\r\n``Slider:Activate()``: Activates the slider and if it's the first run then sets the ``DefaultValue`` if available.\r\n- Arguments: void\r\n- Returns: void\r\n``Slider:Deactivate()``: Deactivates the slider with disconnecting events.\r\n- Arguments: void\r\n- Returns: void\r\n\r\nThere are some events with a ``Slider`` object as well.\r\n\r\n``Slider.InteractionBegan`` - Fires when player starts interacting with the slider.\r\n- Type: BindableEvent\r\n- Returns: void\r\n\r\n``Slider.InteractionEnded`` - Fires when player stops interacting with the slider.\r\n- Type: BindableEvent\r\n- Returns: (number) LastValue - Returns the last value of the slider\r\n\r\n``Slider.ValueChanged`` - Fires when value changes to a new one.\r\n- Type: BindableEvent\r\n- Returns: (number) CurrentValue - Returns the current value of the slider\r\n\r\n## Examples\r\nThere is also an example of this module working in this repo. Place file is in PlaceFile folder and all scripts are located in src folder.\r\nWarning for beginners, do not sync this with your own project. The default.project.json file is set to overwriting the contents of target services. Instead, you should copy the module or use Wally.\r\n","readmeTruncated":false}