Giter Site home page Giter Site logo

uit_rangeslider's Introduction

RangeSlider

An alternative to the built-in MinMaxSlider, built to support more intuitive interaction and customization.

comparison

Public API

The API and structure for RangeSlider is very similar to MinMaxSlider and is intended to be as close to a drop-in replacement as possible.

UXML Properties

min-value Sets the initial MinValue (low end of the selection) float
max-value Sets the initial MaxValue (high end of the selection) float
low-limit Sets LowLimit (the minimum possible value on the slider) float
high-limit Sets HighLimit (the maximum possible value on the slider) float
interaction-mode Sets Mode, to determine which parts of the slider are interactive and how they should behave One of: Disabled, ThumbsOnly, SelectionOnly, ThumbsAndSelection

Properties

Mode The InteractionMode of the slider. Allows you to set whether the thumbs, selection area, or both accept and handle input.
LowLimit The lowest possible value that can be selected.
HighLimit The highest possible value that can be selected.
MinValue The lower value of the current selection.
MaxValue The upper value of the current selection.
value The current value of the slider, as a Vector2
Range The distance between MinValue and MaxValue.
TotalRange The distance between LowLimit and HighLimit.
MarkerContainer A VisualElement you can use to insert custom markers, icons, etc., into the slider.

Additional Methods

AddMarker(float value, Color color) Inserts a simple line marker at the given value of the slider
AddMarker(float v0, float v1, Color color) Inserts a rectangular marker which spans the values between v0 and v1
ClearMarkers() Clears all markers from the slider (including any you may have added directly to the MarkerContainer)

Installation Instructions

  1. In Unity, open the Package Manager (Window -> Package Manager)
  2. In the Add Package menu, choose Add package from git url...
  3. Enter [email protected]:noirb/UIT_RangeSlider.git to get the latest version.
    • You can specify an explicit version by appending a tag or commit hash to the end of the URL:
      [email protected]:noirb/UIT_RangeSlider.git#v1.0.0
      
  4. After installing the package, add the RangeSlider stylesheet to your Runtime theme.

uit_rangeslider's People

Contributors

noirb avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.