Kodi Community Forum
Solved slider knob not working (like it did in 16) - Printable Version

+- Kodi Community Forum (https://forum.kodi.tv)
+-- Forum: Development (https://forum.kodi.tv/forumdisplay.php?fid=32)
+--- Forum: Add-ons (https://forum.kodi.tv/forumdisplay.php?fid=26)
+--- Thread: Solved slider knob not working (like it did in 16) (/showthread.php?tid=306633)



slider knob not working (like it did in 16) - zosky - 2017-02-11

hi yall. i've rolled my own addon to change the volume on our AVR and its not behaving the same way after the upgrade

in jarvis it looked like this
Image

and in krypton ...
Image

i guess this is where my problem is, but i can't figure out what to do about it. help plz

Code:
## make a slider
nob = xbmc.translatePath("special://home/addons/script.sony.volumeControl/img/slider-nob-" + cmd + ".png")
SLIDE = xbmcgui.ControlSlider(x=25, y=200, width=100, height=40,
  textureback=xbmc.translatePath("special://home/addons/script.sony.volumeControl/img/slider-back.png"),
  texture=nob )

if anyone wants to see it in action. i stripped out all the junk that does wake-on-lan if the unit is off, getting the current volume and sending the SOAP requests... all thats left is the GUI part. i've also includes a keymap that fires up the script with Q=volumeUP and W=down

thanks in advance


RE: slider knob not working (like it did in 16) - User 342716 - 2017-02-11

Looks like in 17 you have to add orientation to default to horizontal.

orientation=xbmcgui.HORIZONTAL

http://forum.kodi.tv/showthread.php?tid=250936&pid=2341037&highlight=Slider#pid2341037

Have you tried to see if this addresses your issue?


RE: slider knob not working (like it did in 16) - zosky - 2017-02-12

thank you, that did it


RE: slider knob not working (like it did in 16) - User 342716 - 2017-02-12

(2017-02-12, 04:52)zosky Wrote: thank you, that did it

You are welcome