Kodi Community Forum

Full Version: Activate movie/music info windows with a button
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Pages: 1 2
At the moment, if you use an XBMC.ActivateWindow() command to bring up the info windows, the contents are empty. Would it be possible to get such a shortcut working?
the contents are empty because the list doesn't have focus to tell the dialog what movie to display it for

think how it would not work with anything that is not 1 line like a thumbpanel you have to nav off the current item you want just to get to the info button.
It's possible that we may be able to implement something like:

ActivateWindow(VideoInfo,<path_to_lookup_on>)

If this is what you're after, then add a ticket on trac so that we don't forget.
Request added to trac.
Sorry for bumping such an old thread, but I'm looking to do the same thing (add an info button to the view).

I noticed the Trac (Ticket #5616) is still open.

Given the inactivity on the ticket, I wonder if anyone's found a workaround. If so, please let me know.

Thanks.
try adding both of these in the same order

<onclick>Setfocus(50)</onclick>
<onclick>ActivateWindow(MovieInformation)</onclick>

this will of course only work with list type containers (1 row or column) and not panels because you will have to nav away from the correct focused item to get to the button so a different movie will have focus and it will show that info.
It will probably also fail for mouse users too because you can't force focus from the pointer
Jezz_X Wrote:try adding both of these in the same order

<onclick>Setfocus(50)</onclick>
<onclick>ActivateWindow(MovieInformation)</onclick>
Ohhh.... I'm getting so close to what I've been wishing for. (Clicking on a movie opens the info screen instead of playing the movie).

I've been trying the following work around:
Start with a fixed list - focused item set to <visible>false</visible>
Add a Button - shown where the focused item should be with same info
Set Button ondown/onup - <ondown>Control.Message(55,moveup)</ondown> to scroll the list even though I'm not focused on it.

The above mimics a list but it means I can control the <onclick> myself. However I couldn't get the info screen to display the info for the correct movie! Then I tried what you posted above Jezz and.... it still didn't work. No But then I changed it to the following:

<onclick>Setfocus(55)</onclick>
<onclick>Info</onclick>

Success! I can scroll up and down my movies, click on one and the info pops up, then I can choose play trailer or play movie from there.

However, when I go back to the nav screen I am no longer focused on the button, just the list, and I can't load the info again. Can anyone solve this final piece of the puzzleHuh (Hope that all made sense)
long shot and not likely to work...

add another onclick in order to put the focus back to the button:
<onclick>Setfocus(55)</onclick>
<onclick>Info</onclick>
<onclick>Setfocus(buttonid)</onclick>
ronie Wrote:long shot and not likely to work...

add another onclick in order to put the focus back to the button:
<onclick>Setfocus(55)</onclick>
<onclick>Info</onclick>
<onclick>Setfocus(buttonid)</onclick>

You're a genius good sir. It works.
If you wouldn't mind posting the code I'd love to play around with it...
No problem, I've mainly been learning coding from Night anyway!!

Code:
<includes>
    <include name="Viewtype_Files">
        <control type="button" id="87">
                  <posx>10</posx>
               <posy>302</posy>
                <width>980</width>
                 <height>200</height>
                  <label>$INFO[ListItem.Label]</label>
                  <font>TitleBiggest</font>
                  <textcolor>FFFFFFFF</textcolor>
                  <onclick>Setfocus(55)</onclick>
            <onclick>Info</onclick>
            <onclick>Setfocus(87)</onclick>
            <disabledcolor>FFFFFFFF</disabledcolor>
            <focusedcolor>FFFFFFFF</focusedcolor>
                  <onup>Control.Message(55,movedown)</onup>
                  <ondown>Control.Message(55,moveup)</ondown>
        </control>
        <control type="fixedlist" id="55">
            <posx>0</posx>
            <posy>72</posy>
            <height>648</height>
            <width>1280</width>
            <onup>55</onup>
            <ondown>55</ondown>
            <onleft>7000</onleft>
            <onright>7000</onright>
            <scrolltime>5</scrolltime>
            <viewtype label="Files">list</viewtype>
            <orientation>vertical</orientation>
            <focusposition>4</focusposition>
            <itemlayout width="700" height="64">
                <control type="label">
                    <width>480</width>
                    <height>45</height>
                    <posx>20</posx>
                    <posy>0</posy>
                    <font>TitleNF</font>
                    <textcolor>60b8b7b7</textcolor>
                    <label>$INFO[ListItem.Label]</label>
                    <visible>!Container.Content(episodes)</visible>
                </control>
            </itemlayout>
            <focusedlayout width="1280" height="120">
                <control type="fadelabel">
                    <posx>10</posx>
                    <posy>-4</posy>
                    <width>1260</width>
                    <height>100</height>
                    <scrollout>false</scrollout>
                    <pauseatend>600</pauseatend>
                    <font>TitleBiggest</font>
                    <textcolor>ffffffff</textcolor>
                    <shadowcolor>ff59595f</shadowcolor>
                    <label>$INFO[ListItem.Label]</label>
                    <visible>false</visible>
                </control>
            </focusedlayout>
        </control>
    </include>
</includes>

You need to set myvideonav default control to the button id (i.e. 87). This however causes a problem as I've just discovered. I only want this view in movies, but if I go into tv shows it isn't focused on the list because it's looking for the button I guess. Looking for a solution.
Thx, love to try this out...I've been dying to try and replicate this image below's look/behavior. I've sorta came close before but not as close as it seems you have right now:

Image
I've spent weeks annoying myself with this problem as you know, I was convinced it couldn't be done, but Jezz's post above give me hope and it took me closer. I use the <onclick> to launch the info dialog obviously but it can do whatever you want I guess. I just need to figure out how to get other views to work again :mad:
mcborzu Wrote:Thx, love to try this out...I've been dying to try and replicate this image below's look/behavior. I've sorta came close before but not as close as it seems you have right now:

Image

This can easily be done with the same "hack" you have your main list then have 3 buttons above it and on each button set focus to the list first then do <onclick> of play and info and whatever the play trailer command is
Jezz, how can I make a button on a viewtype always have focus first instead of the list?
Pages: 1 2