Updated specific locations to be searchable, take a look at Las Vegas as an example.

This post has been de-listed

It is no longer included in search results and normal feeds (front page, hot posts, subreddit posts, etc). It remains visible only via the author's post history.

1
[UI] How to best set up connected/dependent sliders(or other user input oriented UI elements)?
Author Summary
Vosheck is in UI
Post Body

What would be the best way to set up and X number of code instantiated sliders that add up to a shared total? E.g. Slider A is on 100%, Slider B and C are on 0%. Moving Slider A to 90% would result in Sliders B and C increasing to 5% each.

Simply adding a listener onValueChanged and controling the slider.value through code doesn't quite work because any change of a slider's value invokes onValueChanged in an infinite loop.

I thought about using IPointerUpHandler and IPointerDownHandler to subscribe/unsubscribe listeners to onValueChanged in order to prevent the infinite loop, but it seems kinda hacky. E.g. onValueChanged listeners are subscribed-->user modifies a slider by clicking on it-->OnPointerDown unsubscribes all the onValueChanged listeners of sliders except the slider that has been clicked-->OnPointerUp subscribes the listeners of the aforementioned sliders.

Using IpointerUpHandler to determine which slider has been modified by detecting which UI element is under the mouse seems finicky at best.

Author
Account Strength
80%
Account Age
9 years
Verified Email
Yes
Verified Flair
No
Total Karma
188
Link Karma
167
Comment Karma
21
Profile updated: 3 days ago
Posts updated: 2 weeks ago

Subreddit

Post Details

Location
UI
We try to extract some basic information from the post title. This is not always successful or accurate, please use your best judgement and compare these values to the post title and body for confirmation.
Posted
6 years ago