Any way to clone a controls parameters?
#1
Code:
<control type="image" id="33009">
            <left>345</left>      
            <top>-1000</top>  
            <height>74</height>  
            <width>74</width>
            <texture>text.png</texture>
        </control>
        <control type="image" id="33010">
            <left>345</left>  
            <top>-1000</top>  
            <height>222</height>  
            <width>2222</width>
            <texture>text.png</texture>
        </control>

I have two textures in a custom script xml... Control 33009 is hard coded and controled by python... I'd like Control 33010 to share the x and y position of 33009 without using python. Is this possible? perhaps a built-in i'm unfamiliar with?
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#2
Pretty sure it isn't possible without python.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#3
(2017-09-15, 07:24)jurialmunkey Wrote: Pretty sure it isn't possible without python.

Thanks, In this case I'm trying to limit my hard coded controls to allow for greater flexibility when skinning.
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#4
I was thinking maybe you could do something like set a group id with a certain width and height and then use a slide animation to reposition the second control... but that is probably a bit convoluted.

e.g.
Code:
<control type="group" id="33008">
    <control type="image" id="33009">
        <width>100%</width>
        <height>100%</height>
    </control>
    <control type="image" id="33010">
        <animation effect="slide" end="XCOORD,YCOORD" condition="true">Conditional</animation>
        <width>100%</width>
        <height>100%</height>
    </control>
</control>
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#5
(2017-09-15, 09:31)jurialmunkey Wrote: I was thinking maybe you could do something like set a group id with a certain width and height and then use a slide animation to reposition the second control... but that is probably a bit convoluted.

e.g.
Code:
<control type="group" id="33008">
    <control type="image" id="33009">
        <width>100%</width>
        <height>100%</height>
    </control>
    <control type="image" id="33010">
        <animation effect="slide" end="XCOORD,YCOORD" condition="true">Conditional</animation>
        <width>100%</width>
        <height>100%</height>
    </control>
</control>

hmmm... interesting... does animation allow window property values? I can't use VARS since they are not compatible with scripts.

This could work, but I have a feeling you can't use window properties... I'll have to test it out... Thanks
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#6
I am 99% sure you can use window property as a condition for conditional animation trigger.

Using string is equal or empty

$info window property as long as it is set to true
Shield TV | Windows 10 | Mariadb | Mii Box
Evolve Ecosystem Repo | TV Melodies | Madnox Holiday Mod
Reply
#7
(2017-09-16, 04:30)smitchell6879 Wrote: I am 99% sure you can use window property as a condition for conditional animation trigger.

You can use it for the condition, but I think Lunatixz is talking about the X/Y coords for the slide animation which you can't do.

It is actually a really annoying limitation because it prevents setting a fade condition based upon a value in a string. Instead you have to make individual animations for every single possible value and use conditionals.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply
#8
Can constants be used?
Just curious if you can hack a string as the constant value..

Code:
<constant name="posx">$INFO[Skin.String(user_posx)]</constant>


..might blow up kodi
Reply
#9
Thanks for the ideas....

I'm going to play around with the slide animation tonight... When thinking about it... It should work.

Thanks again for all the suggestion, I will report back.


Sent from my SM-G935T
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#10
I couldn't get it working Sad

One main issue is the amount of custom properties negates the efficiency and simplicity i was looking for reducing hardcoded controls. In the end its easier to hardcode the control...
Image Lunatixz - Kodi / Beta repository
Image PseudoTV - Forum | Website | Youtube | Help?
Reply
#11
Yeah I had a feeling that would be the case. It was a bit of a long shot suggestion.
Arctic Fuse - Alpha now available. Support me on Ko-fi.
Reply

Logout Mark Read Team Forum Stats Members Help
Any way to clone a controls parameters?0