Is there a multi toggle button available?
#1
Hi Guy's

I'm trying to duplicate the function of the view change button ( as seen in the 'view as' menu in my skin or sub menus in most other skins). That is toggle to the next option (or view as in the example) from a list of skinner supplied options. I have looked at a select and spin button, but they will not allow me to specify the options to choose from. The only other thing I have seen that might be suitable is a buttonscroller button, but that is listed as obsolete so I can't use that.

I have tried a list of buttons in a group block and changed the focus with setfocus(blah) which kind of works, but it needs a little help to work properly (I move the focus to current button of the group with the mouse and then it works fine, until I move away from the current custom screen that is).

Does anyone have any ideas that I can try, or am I wasting my time on this? In which case how do others present a list of options for users to toggle thru?

Wyrm (xTV-SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#2
This probably isn't exactly what your looking for but maybe it could be modified

PHP Code:
<control type="radiobutton" id="207">
                        <
description>view Button</description>
                        <
width>450</width>
                        <
align>left</align>
                        <
font>font22_title</font>
                        <
textcolor>white</textcolor>
                        <
focusedcolor>white</focusedcolor>
                        <
shadowcolor>grey3</shadowcolor>
                        <
label>view</label>
                        <
onclick>Skin.ToggleSetting(View0)</onclick>
                        <
selected>Skin.HasSetting(View0)</selected>
                        <
onclick>Skin.Reset(view1)</onclick>
                        <
onclick>Skin.Reset(view2)</onclick>
                        <
onclick>Skin.Reset(view3)</onclick>  
                    
                    </
control
Reply
#3
bridgman Wrote:This probably isn't exactly what your looking for but maybe it could be modified
bridgman,
Thanks for the example but it's not views that I want to show users but entry points to the library. The code that I am using at the moment is :
PHP Code:
<control type="group" id="930">
                <
width>480</width>
                <
height>40</height>
                <
visible>Skin.HasSetting(movie-library)</visible>
                <
control type="button" id="931">
                    <
description>Movies Library entry point Title</description>
                    <
posx>0</posx>
                    <
posy>0</posy>
                    <
width>480</width>
                    <
height>40</height>
                    <
onup>13</onup>
                    <
ondown>14</ondown>
                    <
font>font13</font>
                    <
texturefocus>default-button.png</texturefocus>
                    <
texturenofocus>-</texturenofocus>
                    <
textwidth>460</textwidth>
                    <
enable>Skin.HasSetting(movie-library)</enable>
                    <
label>$LOCALIZE[31680]</label>
                    <
label2>$INFO[Skin.String(movie-libraryentry)]</label2>
                    <
onclick>Skin.SetString(movie-libraryentry,$LOCALIZE[20108])</onclick>
                    <
onclick>SetFocus(932)</onclick>
                    <
textcolor>button-text</textcolor>
                    <
disabledcolor>disabled-text</disabledcolor>
                    <
aligny>center</aligny>
                    <
textoffsetx>30</textoffsetx>
                    <
visible allowhiddenfocus="true">!Skin.String(movie-libraryentry) | SubString(Skin.String(movie-libraryentry),$LOCALIZE[369],Left)</visible>
                </
control>
                <
control type="button" id="932">
                    <
description>Movies Library entry point Root</description>
                    <
posx>0</posx>
                    <
posy>0</posy>
                    <
width>480</width>
                    <
height>40</height>
                    <
onup>13</onup>
                    <
ondown>14</ondown>
                    <
font>font13</font>
                    <
texturefocus>default-button.png</texturefocus>
                    <
texturenofocus>-</texturenofocus>
                    <
textwidth>460</textwidth>
                    <
enable>Skin.HasSetting(movie-library)</enable>
                    <
label>$LOCALIZE[31680]</label>
                    <
label2>$INFO[Skin.String(movie-libraryentry)]</label2>
                    <
onclick>Skin.SetString(movie-libraryentry,$LOCALIZE[20386])</onclick>
                    <
onclick>SetFocus(933)</onclick>
                    <
textcolor>button-text</textcolor>
                    <
disabledcolor>disabled-text</disabledcolor>
                    <
aligny>center</aligny>
                    <
textoffsetx>30</textoffsetx>
                    <
visible allowhiddenfocus="true">SubString(Skin.String(movie-libraryentry),$LOCALIZE[20108],Left)</visible>
                </
control>
                <
control type="button" id="933">
                    <
description>Movies Library entry point Recentlyadded</description>
                    <
posx>0</posx>
                    <
posy>0</posy>
                    <
width>480</width>
                    <
height>40</height>
                    <
onup>13</onup>
                    <
ondown>14</ondown>
                    <
font>font13</font>
                    <
texturefocus>default-button.png</texturefocus>
                    <
texturenofocus>-</texturenofocus>
                    <
textwidth>460</textwidth>
                    <
enable>Skin.HasSetting(movie-library)</enable>
                    <
label>$LOCALIZE[31680]</label>
                    <
label2>$INFO[Skin.String(movie-libraryentry)]</label2>
                    <
onclick>SetFocus(931)</onclick>
                    <
onclick>Skin.SetString(movie-libraryentry,$LOCALIZE[369])</onclick>
                    <
textcolor>button-text</textcolor>
                    <
disabledcolor>disabled-text</disabledcolor>
                    <
aligny>center</aligny>
                    <
textoffsetx>30</textoffsetx>
                    <
visible allowhiddenfocus="true">SubString(Skin.String(movie-libraryentry),$LOCALIZE[20386],Left)</visible>
                </
control>
            </
control
The onup and ondown of 13 and 14 are the button id's that precede and follow my button block. About the only way I can think to proceed with this idea is to have conditional includes to setfocus to the correct button based on the skin string movie-libraryentry. Other than that, I'm out of ideas.

Wyrm (xTV-SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#4
This is what I used from Confluence (cheers Jezz)

http://pastebin.com/LDF5qApW
Reply
#5
And what a marvelous hack it was too lol
Reply
#6
That is a marvellous hack indeed.

The plan ™ is to make the homescreen more flexible using the following tactic:

1. Create a virtual filesystem specified via XML. This will allow you to customize the "root" of the library, put smartplaylists there or whatever.

2. Allow a files node to be included in 1 (or specific folders), negating the need for the separate files mode.

3. Allow a list anywhere in the skin to be filled (in the background) by simply specifying a path, rather than specifying the items directly via static content. Clicking on an item will then do the usual thing you would expect (eg go to a directory in the appropriate window, running a script etc.)

What is still unknown about this stuff is really 2 things:

1. Exactly how we can easily allow the user to configure such a listing from the UI. It's somewhat like editing a playlist (generalize the music playlist editor perhaps?), though I guess we could have more levels (subfolders).

2. If we allow the homescreen to be constructed from these types of list (thus allowing the user easy, uniform control over their homescreen items regardless of skin) exactly how do we do it to ensure that skinners still have some control and flexibility, while users can have a common system? eg, do we force things to be 2 layers deep (main menu + sub menus?)

Cheers,
Jonathan
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
lol I think jmarshall got a little off topic here Smile
Reply
#8
Quote:but it's not views that I want to show users but entry points to the library.

Not completely off-topic :p. The entry points to the library are basically the root of the library, thus a directory listing.
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
#9
jmarshall Wrote:2. Allow a files node to be included in 1 (or specific folders), negating the need for the separate files mode.

Merging of files will surely be welcomed from my part. Useful thing, IMHO, would be replicating Recently Added from video root to Movies and TV sections, so you can find it if linking directly to movies from Home. Actual situation gives you everything else but this, so it's being "remedied" through recently added script.

As for the other ideas, I'm little afraid of impact it might have on complexity of use and to skin, but maybe I'm wrong.
My skins:

Amber
Quartz

Reply
#10
Jezz_X Wrote:And what a marvelous hack it was too lol
Jezz and Hitcher,

Thanks guys, that looks just what I'm after. Will give it a go and see how I get on.

Wyrm (xTV-SAF)
If required a FULL debug log can now be submitted from the skin in settings->skin settings->support. Or follow instructions here if you can't access skin settings.

FAQ's located at :- http://kodi.wiki/view/Add-on:AppTV
Reply
#11
Jezz_X Wrote:And what a marvelous hack it was too lol

I was very impressed when I checked out how it worked and made sure to credit you when I implemented it into Alaska. Wink
Reply

Logout Mark Read Team Forum Stats Members Help
Is there a multi toggle button available?0