Slider with <info>
#1
The documentation on slider control says the info tag
Quote:Specifies the information that the slider controls.

This is a bit cryptic, but I interpret this as meaning I can do this:

Code:
<info>Window.Property(SliderValue)</info>

then in my script:

Code:
slidervalue = WINDOW.getProperty('SliderValue')

This doesn't work. I can't find examples of <info> in action. Can someone clarify what this tag does?
Reply
#2
It only supports volume and seek I think it is - basically there needs to be code within the slider so it knows what to do with that property.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
(2013-12-27, 01:50)jmarshall Wrote: basically there needs to be code within the slider so it knows what to do with that property.

I don't understand. Do you mean that something needs to be added to XBMC source, or do you mean that there's something I can add to my control to make it work? If the latter, can you give an example?
Reply
#4
The source. If you check guilib/GUISliderControl.cpp you'll see it specifically handles a small number of properties/events.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
OK. To clarify, can you confirm that the only thing a slider (<control type="slider">) can ever control is volume and seek?

The documentation says "such as" suggesting volume and seek are just examples of the many things a slider can control.

Would a <control type="sliderex"> be able to control a window property? Are there any examples of sliderex controlling something with the <info> tag?
Reply
#6
No. As I said, only the stuff in guilib/GUISliderControl.cpp can be controlled.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#7
If the slider will only control seek or volume, as the code implies, what is the point of the <info> tag? Does it do anything at all?
HDHomerun Quatro, RaspPi/TVHeadend, NUC/Win10/Kodi, Mousetuary skin, Mouse on couch!
Reply
#8
(2017-10-16, 04:32)aegidius Wrote: If the slider will only control seek or volume, as the code implies, what is the point of the <info> tag? Does it do anything at all?

Answered my own question with a little reading in the source code....
it seems that sliders can only have two actions, volume or seek, or else no action at all. (this from xbmc/xbmc/guilib/GUISliderControl.cpp )
Code:
static const SliderAction actions[] = {
 {"seek",    "PlayerControl(SeekPercentage(%2f))", PLAYER_PROGRESS, false},
 {"volume",  "SetVolume(%2f)",                     PLAYER_VOLUME,   true}
};

If a slider has an action then the info tag is overridden by that from the table above:

Code:
int infoCode = m_iInfoCode;
 if (m_action && (!m_dragging || m_action->fireOnDrag))
infoCode = m_action->infoCode;

But if the slider is to display something else, then it must have a null action.
So the way to get some other info to display with a seek slider, is to have two sliders: the first to display the nib, with (say) PVR.Progress, and the second with no nib to do that seek action.
HDHomerun Quatro, RaspPi/TVHeadend, NUC/Win10/Kodi, Mousetuary skin, Mouse on couch!
Reply

Logout Mark Read Team Forum Stats Members Help
Slider with <info>0