'Live' slider in addon settings
#1
Is it possible to have a slider in your addon's settings that behaves in a 'live' manner - e.g. to control the brightness of an external screen? So as the slider changes from 0 to 100, an action e.g.

Code:
action="RunScript($ID,changeBrightness,currentSliderValue)"

...is called?

At the moment I have it all working but they have to set the slider value, save the setting, then come back in to setting and hit a button that calls the action...which is... naff.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#2
(2017-01-07, 02:52)bossanova808 Wrote: Is it possible to have a slider in your addon's settings that behaves in a 'live' manner - e.g. to control the brightness of an external screen? So as the slider changes from 0 to 100, an action e.g.

Code:
action="RunScript($ID,changeBrightness,currentSliderValue)"

...is called?

At the moment I have it all working but they have to set the slider value, save the setting, then come back in to setting and hit a button that calls the action...which is... naff.

I'm not sure you can overwrite the actions on settings. There are settings controls though. Maybe you could create your own settings dialog and then code your own action based on focus and movement?

Or you could run a script using a setting that opens a custom dialog with a slider that has the action built in and changes the setting then saves the value to your settings.
Reply
#3
Yep there's definitely ways around it by writing custom code, but it seem like a slider that call an action on a change (and indeed other controls calling things as they change) - would make for a much better settings experience.
Addons I wrote &/or maintain:
OzWeather (Australian BOM weather) | Check Previous Episode | Playback Resumer | Unpause Jumpback | XSqueezeDisplay | (Legacy - XSqueeze & XZen)
Sorry, no help w/out a *full debug log*.
Reply
#4
(2017-01-09, 01:15)bossanova808 Wrote: Yep there's definitely ways around it by writing custom code, but it seem like a slider that call an action on a change (and indeed other controls calling things as they change) - would make for a much better settings experience.

I fully agree, and there are a lot of controls that would be much better if they would extend Support for specific things. But sadly it seems not everyone agrees so it tends not to happen. If you add a feature request maybe you will win the lotto. Smile. I could only assume the reason why it is not there is mainly settings is a dialog which keeps focus so one would not normally be able to see changes until you hit ok.
Reply

Logout Mark Read Team Forum Stats Members Help
'Live' slider in addon settings0