In the sectioin of the custom buttons is a slider.
I would like to use the value of this slider in a video skin to fade the visibility of an element.
Here is the problem:
I always get only 0% or 100% but nothing in between.
In my video skin I have the following just to view the value for testing:
In the button i tried
1:
2:
3:
Nothing of that helps.
It is alway 0% when the slider is on the left side of the middle of the slider.
And on the other side it is always 100%.
How to get it work fluently?
I would like to use the value of this slider in a video skin to fade the visibility of an element.
Here is the problem:
I always get only 0% or 100% but nothing in between.
In my video skin I have the following just to view the value for testing:
<panel visibility="100%" x="1000" y="500">
<group >
<textzone canstretch="true">
<pos x="+15" y="+0"/>
<size width="500-20" height="50" />
<text size="50" weight="bold" color="white" action="var $myLeftSlider & param_cast 'percentage'" />
</textzone>
</group>
</panel>
In the button i tried
1:
set_var $myLeftSlider
2:
param_smaller 5% ? set_var $myLeftSlider 0 :
param_smaller 15% ? set_var $myLeftSlider 0.1 :
param_smaller 25% ? set_var $myLeftSlider 0.2 :
param_smaller 35% ? set_var $myLeftSlider 0.3 :
param_smaller 45% ? set_var $myLeftSlider 0.4 :
param_smaller 55% ? set_var $myLeftSlider 0.5 :
param_smaller 65% ? set_var $myLeftSlider 0.6 :
param_smaller 75% ? set_var $myLeftSlider 0.7 :
param_smaller 85% ? set_var $myLeftSlider 0.8 :
param_smaller 95% ? set_var $myLeftSlider 0.9 : set_var $myLeftSlider 1
3:
param_smaller 5% ? set_var $myLeftSlider 0% :
param_smaller 15% ? set_var $myLeftSlider 10% :
param_smaller 25% ? set_var $myLeftSlider 20% :
param_smaller 35% ? set_var $myLeftSlider 30% :
param_smaller 45% ? set_var $myLeftSlider 40% :
param_smaller 55% ? set_var $myLeftSlider 50% :
param_smaller 65% ? set_var $myLeftSlider 60% :
param_smaller 75% ? set_var $myLeftSlider 70% :
param_smaller 85% ? set_var $myLeftSlider 80% :
param_smaller 95% ? set_var $myLeftSlider 90% : set_var $myLeftSlider 100%
Nothing of that helps.
It is alway 0% when the slider is on the left side of the middle of the slider.
And on the other side it is always 100%.
How to get it work fluently?
Posted Wed 22 Feb 23 @ 10:25 am
action="get_var $myLeftSlider
should be get_var surely
Posted Wed 22 Feb 23 @ 10:40 am
I have also do this in my skin. A dimm overlay for the waves.
use for the element in the skin not ACTION, use VISIBILITY
code Custom Slider:
code Skin Element
use for the element in the skin not ACTION, use VISIBILITY
code Custom Slider:
set $myLeftSlider
code Skin Element
<textzone canstretch="true" visibility="var $myLeftSlider & param_cast 'percentage'">
<pos x="+15" y="+0"/>
<size width="500-20" height="50" />
<text size="50" weight="bold" color="white" action="" />
</textzone>
Posted Wed 22 Feb 23 @ 4:29 pm
Now I got it.
When using var it behaves binary (on or off / 0% or 100%)
get_var did the trick and works like a float/percentage value. Thank you for this hint.
So now i use
as code for the slider
and
for the visibility of my element.
When using var it behaves binary (on or off / 0% or 100%)
get_var did the trick and works like a float/percentage value. Thank you for this hint.
So now i use
set $myLeftSlider
as code for the slider
and
visibility="get_var $myLeftSlider & param_cast 'percentage'"
for the visibility of my element.
Posted Sat 25 Feb 23 @ 10:56 am
I am sorry, it was my fault. get_var is the correct verb.
Posted Sat 25 Feb 23 @ 12:04 pm