How to use skinshortcuts selected background in windows other than main menu
#1
Hello all,

I apologize in advance if this is a very noob and/or stupid question. 

Before I added menu/submenu/widget customization with skinshortcuts to Amber, the user could select their own background for each of the main menu items, and this custom background would show in windows other than the home window.  That is, if they set a custom background for Movies (which I stored in a skin string), then when they clicked Movies, I would show the custom background in Myvideonav; same for Music, Addons, etc.

I have no idea how to replicate that functionality with skinshortcuts.  Of course, I am providing the functionality already present in skinshortcuts for the user to customize the background for each menu item, with even more possibilities than before.  The problem is, how do I show that custom background in myvideonav, mymusicnav, etc.? As far as I know, the properties for the container which is the main menu are not available in windows other than the home window, correct? Am I missing something very obvious here? Is there a way to solve this?

Thank you for any help in this matter.

Regards,

Bart
Reply
#2
not sure about skinshortcuts but for esyuary they go into the plugin resources folder
resource.images.skinbackgrounds
Reply
#3
(2019-08-03, 01:00)bsoriano Wrote: Hello all,

I apologize in advance if this is a very noob and/or stupid question. 

Before I added menu/submenu/widget customization with skinshortcuts to Amber, the user could select their own background for each of the main menu items, and this custom background would show in windows other than the home window.  That is, if they set a custom background for Movies (which I stored in a skin string), then when they clicked Movies, I would show the custom background in Myvideonav; same for Music, Addons, etc.

I have no idea how to replicate that functionality with skinshortcuts.  Of course, I am providing the functionality already present in skinshortcuts for the user to customize the background for each menu item, with even more possibilities than before.  The problem is, how do I show that custom background in myvideonav, mymusicnav, etc.? As far as I know, the properties for the container which is the main menu are not available in windows other than the home window, correct? Am I missing something very obvious here? Is there a way to solve this?

Thank you for any help in this matter.

Regards,

Bart
If i get you right you need to use the provided/used thumb of your home sections in your background(building) variable.

e.g.
Shortcut 1 - use
<icon>YOUR IMAGE USED</icon>
<thumb />

,as you define custom main menu entrys, you need to add an additional onclick action to set property which need to be used for your bg image variable.

If you use simple main menu without customizationn, you just need to define the variable based on your container content the item navigates to.

e.g.
Shortcuts (Movies Titles)
xml:
<action>ActivateWindow(videos,videodb://movies/titles/,return)</action>
<action>SetProperty(CamefromEntry, 1)</action>
<icon>YOUR IMAGE USED</icon>
        <thumb />

your bg variable should be adjusted to somthing like ...
xml:
<value condition="String.IsEqual(Window.Property(CamefromEntry),1)">YOUR IMAGE USED</value>

And Clear the property onunload where you need to clear it.

xml:
<onunload>ClearProperty(CamefromEntry)</onunload>

IN ADDITION, CHECK THE WIKI

https://github.com/BigNoid/script.skinsh...grounds.md
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#4
(2019-08-03, 13:00)mardukL Wrote:
(2019-08-03, 01:00)bsoriano Wrote: Hello all,

I apologize in advance if this is a very noob and/or stupid question. 

Before I added menu/submenu/widget customization with skinshortcuts to Amber, the user could select their own background for each of the main menu items, and this custom background would show in windows other than the home window.  That is, if they set a custom background for Movies (which I stored in a skin string), then when they clicked Movies, I would show the custom background in Myvideonav; same for Music, Addons, etc.

I have no idea how to replicate that functionality with skinshortcuts.  Of course, I am providing the functionality already present in skinshortcuts for the user to customize the background for each menu item, with even more possibilities than before.  The problem is, how do I show that custom background in myvideonav, mymusicnav, etc.? As far as I know, the properties for the container which is the main menu are not available in windows other than the home window, correct? Am I missing something very obvious here? Is there a way to solve this?

Thank you for any help in this matter.

Regards,

Bart
If i get you right you need to use the provided/used thumb of your home sections in your background(building) variable.

e.g.
Shortcut 1 - use
<icon>YOUR IMAGE USED</icon>
<thumb />

,as you define custom main menu entrys, you need to add an additional onclick action to set property which need to be used for your bg image variable.

If you use simple main menu without customizationn, you just need to define the variable based on your container content the item navigates to.

e.g.
Shortcuts (Movies Titles)
xml:
<action>ActivateWindow(videos,videodb://movies/titles/,return)</action>
<action>SetProperty(CamefromEntry, 1)</action>
<icon>YOUR IMAGE USED</icon>
        <thumb />

your bg variable should be adjusted to somthing like ...
xml:
<value condition="String.IsEqual(Window.Property(CamefromEntry),1)">YOUR IMAGE USED</value>

And Clear the property onunload where you need to clear it.

xml:
<onunload>ClearProperty(CamefromEntry)</onunload>

IN ADDITION, CHECK THE WIKI

https://github.com/BigNoid/script.skinsh...grounds.md

@mardukL, thanks! What I need to do is to have the image or image path the user selected as the background in the skinshortcuts management dialog for a menu item, show up as the background in other windows.

Regards,

Bart
Reply
#5
(2019-08-03, 14:08)bsoriano Wrote:
(2019-08-03, 13:00)mardukL Wrote:
(2019-08-03, 01:00)bsoriano Wrote: Hello all,

I apologize in advance if this is a very noob and/or stupid question. 

Before I added menu/submenu/widget customization with skinshortcuts to Amber, the user could select their own background for each of the main menu items, and this custom background would show in windows other than the home window.  That is, if they set a custom background for Movies (which I stored in a skin string), then when they clicked Movies, I would show the custom background in Myvideonav; same for Music, Addons, etc.

I have no idea how to replicate that functionality with skinshortcuts.  Of course, I am providing the functionality already present in skinshortcuts for the user to customize the background for each menu item, with even more possibilities than before.  The problem is, how do I show that custom background in myvideonav, mymusicnav, etc.? As far as I know, the properties for the container which is the main menu are not available in windows other than the home window, correct? Am I missing something very obvious here? Is there a way to solve this?

Thank you for any help in this matter.

Regards,

Bart
If i get you right you need to use the provided/used thumb of your home sections in your background(building) variable.

e.g.
Shortcut 1 - use
<icon>YOUR IMAGE USED</icon>
<thumb />

,as you define custom main menu entrys, you need to add an additional onclick action to set property which need to be used for your bg image variable.

If you use simple main menu without customizationn, you just need to define the variable based on your container content the item navigates to.

e.g.
Shortcuts (Movies Titles)
xml:
<action>ActivateWindow(videos,videodb://movies/titles/,return)</action>
<action>SetProperty(CamefromEntry, 1)</action>
<icon>YOUR IMAGE USED</icon>
        <thumb />
your bg variable should be adjusted to somthing like ...
xml:
<value condition="String.IsEqual(Window.Property(CamefromEntry),1)">YOUR IMAGE USED</value>
And Clear the property onunload where you need to clear it.
xml:
<onunload>ClearProperty(CamefromEntry)</onunload>

IN ADDITION, CHECK THE WIKI

https://github.com/BigNoid/script.skinsh...grounds.md    

@mardukL, thanks! What I need to do is to have the image or image path the user selected as the background in the skinshortcuts management dialog for a menu item, show up as the background in other windows.

Regards,

Bart    

Above example is just my theory.
But forget about the custom action....

Did you check the wiki?

The generated Path from shortcuts should be  $INFO[ListItem.Property(Background)]
(Script.Shortcuts writes properties for the entrys and save them in
- userdata/addondata/script.skinshortcuts/*your skin id*.properties (lookup for 'background' ) )

So can you test how that supports ?

Skin_includes.xml

simple example, using bg and the Skin.HasSetting(UseSectionBackground) setting, if its not optional simple delete that conditions.

Use the stored $INFO[Window(home).Property(SectionBackground)] which will be ceated when Home unloads

 
xml:
   <include name="GlobalBackground">
        
        <control type="group" description="Hidden Control To Use in backgroundVar">
            <include>HiddenObject</include>
            <control type="image" id="99006">
                <texture background="true">$VAR[fanartBackground]</texture>
            </control>
        </control>
        
        
        <control type="multiimage" id="99999">
                <width>100%</width>
                <height>100%</height>
                <imagepath background="true" fallback="colors/color_black.png">$VAR[backgroundVar]</imagepath>
                <aspectratio>scale</aspectratio>
                <fadetime>800</fadetime>
                <randomize>true</randomize>
                <timeperimage>6000</timeperimage>
                <loop>yes</loop>
        </control>
    </include>
    
     <variable name="backgroundVar">
        <!-- anything whats defined in HiddenControl id=99006 = $VAR[fanartBackground] defined to use based on focused items -->
        <value condition="Control.IsVisible(99006) + !String.IsEmpty(Control.GetLabel(99006))">$INFO[Control.GetLabel(99006)]</value>
        <!-- Home Item backgrounds based on current container entry ... eg 300 is sub, 4444 is main menu  -->
        <value condition="Skin.HasSetting(UseSectionBackground) + !String.IsEmpty(Container(4444).ListItem.Property(Background)) + Control.HasFocus(4444)">$INFO[Container(4444).ListItem.Property(Background)]</value>
        <value condition="Skin.HasSetting(UseSectionBackground) + !String.IsEmpty(Container(300).ListItem.Property(Background)) + !String.Contains(Container(300).ListItem.Property(Background),widgetfanart)">$INFO[Container(300).ListItem.Property(Background)]</value>
        <!-- use home.xml to set property path -->
        <value condition="!String.IsEmpty(Window(home).Property(SectionBackground)) + !Window.IsActive(script-skinshortcuts.xml) + !Window.IsActive(home)">$INFO[Window(home).Property(SectionBackground)]</value>
    </variable>
    
    
HOME.XML
    
   -  Set Property ONUNLOAD,
- set property based on focused main or submenu item (Container) from , so that backgroundVar  can lookup the property path in the next window which is using the <include>GlobalBackground</include>

- just add this
xml:

<onunload condition="Skin.HasSetting(UseSectionBackground)">SetProperty(SectionBackground,$INFO[Control.GetLabel(99999)])</onunload>
Skins |  Titan M O D   •   S W A N (WIP)
Reply
#6
(2019-08-03, 15:37)mardukL Wrote:
(2019-08-03, 14:08)bsoriano Wrote:
(2019-08-03, 13:00)mardukL Wrote: If i get you right you need to use the provided/used thumb of your home sections in your background(building) variable.

e.g.
Shortcut 1 - use
<icon>YOUR IMAGE USED</icon>
<thumb />

,as you define custom main menu entrys, you need to add an additional onclick action to set property which need to be used for your bg image variable.

If you use simple main menu without customizationn, you just need to define the variable based on your container content the item navigates to.

e.g.
Shortcuts (Movies Titles)
xml:
<action>ActivateWindow(videos,videodb://movies/titles/,return)</action>
<action>SetProperty(CamefromEntry, 1)</action>
<icon>YOUR IMAGE USED</icon>
        <thumb />
your bg variable should be adjusted to somthing like ...
xml:
<value condition="String.IsEqual(Window.Property(CamefromEntry),1)">YOUR IMAGE USED</value>
And Clear the property onunload where you need to clear it.
xml:
<onunload>ClearProperty(CamefromEntry)</onunload>

IN ADDITION, CHECK THE WIKI

https://github.com/BigNoid/script.skinsh...grounds.md    

@mardukL, thanks! What I need to do is to have the image or image path the user selected as the background in the skinshortcuts management dialog for a menu item, show up as the background in other windows.

Regards,

Bart    

Above example is just my theory.
But forget about the custom action....

Did you check the wiki?

The generated Path from shortcuts should be  $INFO[ListItem.Property(Background)]
(Script.Shortcuts writes properties for the entrys and save them in
- userdata/addondata/script.skinshortcuts/*your skin id*.properties (lookup for 'background' ) )

So can you test how that supports ?

Skin_includes.xml

simple example, using bg and the Skin.HasSetting(UseSectionBackground) setting, if its not optional simple delete that conditions.

Use the stored $INFO[Window(home).Property(SectionBackground)] which will be ceated when Home unloads

 
xml:
   <include name="GlobalBackground">
        
        <control type="group" description="Hidden Control To Use in backgroundVar">
            <include>HiddenObject</include>
            <control type="image" id="99006">
                <texture background="true">$VAR[fanartBackground]</texture>
            </control>
        </control>
        
        
        <control type="multiimage" id="99999">
                <width>100%</width>
                <height>100%</height>
                <imagepath background="true" fallback="colors/color_black.png">$VAR[backgroundVar]</imagepath>
                <aspectratio>scale</aspectratio>
                <fadetime>800</fadetime>
                <randomize>true</randomize>
                <timeperimage>6000</timeperimage>
                <loop>yes</loop>
        </control>
    </include>
    
     <variable name="backgroundVar">
        <!-- anything whats defined in HiddenControl id=99006 = $VAR[fanartBackground] defined to use based on focused items -->
        <value condition="Control.IsVisible(99006) + !String.IsEmpty(Control.GetLabel(99006))">$INFO[Control.GetLabel(99006)]</value>
        <!-- Home Item backgrounds based on current container entry ... eg 300 is sub, 4444 is main menu  -->
        <value condition="Skin.HasSetting(UseSectionBackground) + !String.IsEmpty(Container(4444).ListItem.Property(Background)) + Control.HasFocus(4444)">$INFO[Container(4444).ListItem.Property(Background)]</value>
        <value condition="Skin.HasSetting(UseSectionBackground) + !String.IsEmpty(Container(300).ListItem.Property(Background)) + !String.Contains(Container(300).ListItem.Property(Background),widgetfanart)">$INFO[Container(300).ListItem.Property(Background)]</value>
        <!-- use home.xml to set property path -->
        <value condition="!String.IsEmpty(Window(home).Property(SectionBackground)) + !Window.IsActive(script-skinshortcuts.xml) + !Window.IsActive(home)">$INFO[Window(home).Property(SectionBackground)]</value>
    </variable>
    
    
HOME.XML
    
   -  Set Property ONUNLOAD,
- set property based on focused main or submenu item (Container) from , so that backgroundVar  can lookup the property path in the next window which is using the <include>GlobalBackground</include>

- just add this
xml:

<onunload condition="Skin.HasSetting(UseSectionBackground)">SetProperty(SectionBackground,$INFO[Control.GetLabel(99999)])</onunload>

@mardukL, thank you so much! I didn’t even think about using onunload with the Home window. Great stuff! Smile

Again, thank you!

Regards,

Bart
Reply
#7
(2019-08-03, 15:37)mardukL Wrote:
(2019-08-03, 14:08)bsoriano Wrote:
(2019-08-03, 13:00)mardukL Wrote: If i get you right you need to use the provided/used thumb of your home sections in your background(building) variable.

e.g.
Shortcut 1 - use
<icon>YOUR IMAGE USED</icon>
<thumb />

,as you define custom main menu entrys, you need to add an additional onclick action to set property which need to be used for your bg image variable.

If you use simple main menu without customizationn, you just need to define the variable based on your container content the item navigates to.

e.g.
Shortcuts (Movies Titles)
xml:
<action>ActivateWindow(videos,videodb://movies/titles/,return)</action>
<action>SetProperty(CamefromEntry, 1)</action>
<icon>YOUR IMAGE USED</icon>
        <thumb />
your bg variable should be adjusted to somthing like ...
xml:
<value condition="String.IsEqual(Window.Property(CamefromEntry),1)">YOUR IMAGE USED</value>
And Clear the property onunload where you need to clear it.
xml:
<onunload>ClearProperty(CamefromEntry)</onunload>

IN ADDITION, CHECK THE WIKI

https://github.com/BigNoid/script.skinsh...grounds.md    

@mardukL, thanks! What I need to do is to have the image or image path the user selected as the background in the skinshortcuts management dialog for a menu item, show up as the background in other windows.

Regards,

Bart    

Above example is just my theory.
But forget about the custom action....

Did you check the wiki?

The generated Path from shortcuts should be  $INFO[ListItem.Property(Background)]
(Script.Shortcuts writes properties for the entrys and save them in
- userdata/addondata/script.skinshortcuts/*your skin id*.properties (lookup for 'background' ) )

So can you test how that supports ?

Skin_includes.xml

simple example, using bg and the Skin.HasSetting(UseSectionBackground) setting, if its not optional simple delete that conditions.

Use the stored $INFO[Window(home).Property(SectionBackground)] which will be ceated when Home unloads

 
xml:
   <include name="GlobalBackground">
        
        <control type="group" description="Hidden Control To Use in backgroundVar">
            <include>HiddenObject</include>
            <control type="image" id="99006">
                <texture background="true">$VAR[fanartBackground]</texture>
            </control>
        </control>
        
        
        <control type="multiimage" id="99999">
                <width>100%</width>
                <height>100%</height>
                <imagepath background="true" fallback="colors/color_black.png">$VAR[backgroundVar]</imagepath>
                <aspectratio>scale</aspectratio>
                <fadetime>800</fadetime>
                <randomize>true</randomize>
                <timeperimage>6000</timeperimage>
                <loop>yes</loop>
        </control>
    </include>
    
     <variable name="backgroundVar">
        <!-- anything whats defined in HiddenControl id=99006 = $VAR[fanartBackground] defined to use based on focused items -->
        <value condition="Control.IsVisible(99006) + !String.IsEmpty(Control.GetLabel(99006))">$INFO[Control.GetLabel(99006)]</value>
        <!-- Home Item backgrounds based on current container entry ... eg 300 is sub, 4444 is main menu  -->
        <value condition="Skin.HasSetting(UseSectionBackground) + !String.IsEmpty(Container(4444).ListItem.Property(Background)) + Control.HasFocus(4444)">$INFO[Container(4444).ListItem.Property(Background)]</value>
        <value condition="Skin.HasSetting(UseSectionBackground) + !String.IsEmpty(Container(300).ListItem.Property(Background)) + !String.Contains(Container(300).ListItem.Property(Background),widgetfanart)">$INFO[Container(300).ListItem.Property(Background)]</value>
        <!-- use home.xml to set property path -->
        <value condition="!String.IsEmpty(Window(home).Property(SectionBackground)) + !Window.IsActive(script-skinshortcuts.xml) + !Window.IsActive(home)">$INFO[Window(home).Property(SectionBackground)]</value>
    </variable>
    
    
HOME.XML
    
   -  Set Property ONUNLOAD,
- set property based on focused main or submenu item (Container) from , so that backgroundVar  can lookup the property path in the next window which is using the <include>GlobalBackground</include>

- just add this
xml:

<onunload condition="Skin.HasSetting(UseSectionBackground)">SetProperty(SectionBackground,$INFO[Control.GetLabel(99999)])</onunload>

@mardukL, just to let you know that setting a skin.string on the unload of the home window worked really well, thanks again! Smile

Regards,

Bart
Reply

Logout Mark Read Team Forum Stats Members Help
How to use skinshortcuts selected background in windows other than main menu0