Can't get multi image button to show focus
#1
This is probably obvious to the old hands but I can't for the life of me figure out why my 'repeat' button will not show that it is focused. This is the code that I am currently using:

Code:
<!-- Player buttons -->
        <control type="grouplist" id="999">
            <description>Group OSD Button</description>
            <posx>685r</posx>
            <posy>60</posy>
            <width>650</width>
            <height>32</height>
            <itemgap>6</itemgap>
            <scrolltime>200</scrolltime>
            <orientation>horizontal</orientation>
            <align>center</align>
            <usecontrolcoords>false</usecontrolcoords>
            <onleft>999</onleft>
            <onright>999</onright>
            <onup>999</onup>
            <ondown>999</ondown>            
            <visible>true</visible>
            <control type="togglebutton" id="908">
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-playthru-focus.png</texturefocus>
                <texturenofocus>osd-btn-playthru.png</texturenofocus>
                <usealttexture>Playlist.IsRandom</usealttexture>                
                <alttexturefocus>osd-btn-random-focus.png</alttexturefocus>
                <alttexturenofocus>osd-btn-random.png</alttexturenofocus>
                <onclick>XBMC.PlayerControl(Random)</onclick>
            </control>
            <control type="group" id="907">
                <width>32</width>
                <height>32</height>
                <control type="button">
                    <description>repeat button</description>            
                    <width>32</width>
                    <height>32</height>
                    <texturefocus>osd-btn-repeat-focus.png</texturefocus>
                    <texturenofocus>osd-btn-repeat.png</texturenofocus>
                    <onclick>XBMC.PlayerControl(Repeat)</onclick>
                    <visible>!Playlist.IsRepeat + !Playlist.IsRepeatOne</visible>                
                </control>
                <control type="button">
                    <description>repeatall button</description>            
                    <width>32</width>
                    <height>32</height>
                    <texturefocus>osd-btn-repeatall-focus.png</texturefocus>
                    <texturenofocus>osd-btn-repeatall.png</texturenofocus>
                    <onclick>XBMC.PlayerControl(Repeat)</onclick>
                    <visible>Playlist.IsRepeat</visible>                
                </control>                
                <control type="button">
                    <description>repeatone button</description>            
                    <width>32</width>
                    <height>32</height>
                    <texturefocus>osd-btn-repeatone-focus.png</texturefocus>
                    <texturenofocus>osd-btn-repeatone.png</texturenofocus>
                    <onclick>XBMC.PlayerControl(Repeat)</onclick>
                    <visible>Playlist.IsRepeatOne</visible>                
                </control>                
            </control>
            <control type="button" id="918">
                <description>playlist button</description>
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-playlist-focus.png</texturefocus>
                <texturenofocus>osd-btn-playlist.png</texturenofocus>                
                <onclick>XBMC.ActivateWindow(500)</onclick>
            </control>    
            <control type="image" id="930">
                <description>Dummy</description>
                <width>32</width>
                <height>32</height>
                <texture>-</texture>
                <texturenofocus>-</texturenofocus>                
            </control>    
            <control type="button" id="217">
                <description>Eject Disk</description>
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-eject-focus.png</texturefocus>
                <texturenofocus>osd-btn-eject.png</texturenofocus>                
                <onclick>XBMC.EjectTray()</onclick>
                <visible>System.HasMediadvd</visible>
            </control>
            <control type="button" id="210">
                <description>Skip Bwd</description>
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-skipback-focus.png</texturefocus>
                <texturenofocus>osd-btn-skipback.png</texturenofocus>
                <onclick>XBMC.PlayerControl(Previous)</onclick>
            </control>
            <control type="button" id="211">
                <description>Rewind</description>
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-rewind-focus.png</texturefocus>
                <texturenofocus>osd-btn-rewind.png</texturenofocus>
                <onclick>XBMC.PlayerControl(Rewind)</onclick>
            </control>
            <control type="togglebutton" id="213">
                <description>Play</description>
                <width>32</width>
                <height>32</height>    
                <texturefocus>osd-btn-pause-focus.png</texturefocus>
                <texturenofocus>osd-btn-pause.png</texturenofocus>
                <usealttexture>Player.Paused | Player.Forwarding | Player.Rewinding</usealttexture>
                <alttexturefocus>osd-btn-play-focus.png</alttexturefocus>
                <alttexturenofocus>osd-btn-play.png</alttexturenofocus>            
                <onclick>XBMC.PlayerControl(Play)</onclick>
            </control>
            <control type="button" id="214">
                <description>Stop</description>
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-stop-focus.png</texturefocus>
                <texturenofocus>osd-btn-stop.png</texturenofocus>
                <onclick>XBMC.PlayerControl(Stop)</onclick>
            </control>
            <control type="button" id="215">
                <description>Fast Forward</description>
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-fastfwd-focus.png</texturefocus>
                <texturenofocus>osd-btn-fastfwd.png</texturenofocus>
                <onclick>XBMC.PlayerControl(Forward)</onclick>
            </control>
            <control type="button" id="216">
                <description>Skip Fwd</description>
                <width>32</width>
                <height>32</height>
                <itemgap>6</itemgap>                
                <texturefocus>osd-btn-skipfwd-focus.png</texturefocus>
                <texturenofocus>osd-btn-skipfwd.png</texturenofocus>            
                <onclick>XBMC.PlayerControl(Next)</onclick>
            </control>
            <control type="image" id="940">
                <description>Dummy</description>
                <width>32</width>
                <height>32</height>
                <texture>-</texture>
            </control>    
            <control type="button" id="220">
                <description>Popup Vis Preset List</description>
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-vis-focus.png</texturefocus>
                <texturenofocus>osd-btn-vis.png</texturenofocus>                
                <onclick>XBMC.ActivateWindow(122)</onclick>
            </control>
            <control type="button" id="219">
                <description>Popup Vis Settings</description>
                <width>32</width>
                <height>32</height>
                <texturefocus>osd-btn-setting-focus.png</texturefocus>
                <texturenofocus>osd-btn-setting.png</texturenofocus>                    
                <onclick>XBMC.ActivateWindow(121)</onclick>
            </control>            
        </control>        
<!-- End Player buttons -->
I can get the button to display and I can step thru the visible buttons, but when I click on button id=907 the button retains focus but does not show the focused image. What the hell am I doing wrong? And more importantly, how can I fix it?

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
Bump

I think this is about the sixth time I have asked for help on a skinning issue, and thus far I think I got help on two issues.

Am I not supplying enough (or the correct) information to help find a fix? Am I asking in a rude or disrespectful way? Have I inadvertently trod on some ones toes?

From where I type, I can't see a problem, but obviously there seems to be one. What am I doing wrong with my questions?

At the moment I am relying on the wiki manual (patchy in places, but I know how hard it is to write manuals, so no criticism there) and looking at other peoples skins. Again useful, but only if you are following what others are doing very closely.

Now I'm pretty sure it's probably something REALLY stupid, but I'm buggered if I can see it. If I have been a Burk, by all means point it out.

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
#3
I'll take a guess here because 907 isn't actually a button its a group
when you are clicking the first button you are making it invisible
xbmc then has lost all focus on the button and not been given focus on another
what you need to do is 1 of 2 things
1) just have 1 button for the repeat function and use visibililty of images to fake the button image changing. see how confluence does it here https://xbmc.svn.sourceforge.net/svnroot...ntrols.xml at line 125 and down
2) try reseting the focus back to the group again after you have made it invisible (this may not work) basically add <onclick>SetFocus(907)</onclick> after your other onclicks but that may not work depending on how fast the original button becomes invisible
Reply
#4
same as Jezz_x,

I took a peek but used Alaska's code (which is doing it the same way as Confluence) and OSD folder plugged it into your playercontrols.xml and it worked:
Image

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
Reply
#5
mcborzu Wrote:same as Jezz_x,

I took a peek but used Alaska's code (which is doing it the same way as Confluence) and OSD folder plugged it into your playercontrols.xml and it worked:

Jezz_x and mcborzu,

Thank you both, will try mcborzu's code later to make sure it works. Problem was not that I could not see the button, just that the focus button image would not show (button was still focused). A quick look at the supplied code suggests that was the only way that I had not tried to solve the problem. As I said in the previous message, just needed a fresh pair of eyes to point out where I was going wrong.

Thank you again
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
#6
The obvious thing I spotted was you're not giving those buttons id's.
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
jmarshall Wrote:The obvious thing I spotted was you're not giving those buttons id's.

jmarshall,

Yes you are right, the posted example did not have id's. But I have tried with and without id's, same basic result. I click button (which starts off focused) and then I lose focus on the button until I move away and then move back. I have put all of the buttons into a group list as it allows me add or remove buttons and XBMC lays them out for me. I don't have to keep track of anything (next/previous button, button spacing/alignment etc), only problem is I can't get a button with more than two states (repeat track requires, repeat off, repeat everything and repeat one)to work in a group list.

It really looks like I will have to stop using a group list and do things the way everyone else does things. Pity, I really liked the way things just looked after themselves.

To mcborzu and Jezz_x, thanks guys but SetFocus did not work and moving things into playercontrols.xml is going back to the problems I had with VideoOSD.xml (that way lays madness).

Thanks anyway
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

Logout Mark Read Team Forum Stats Members Help
Can't get multi image button to show focus0