[Help] How Do You Change Views...

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
Dom DXecutioner Offline
Senior Member
Posts: 100
Joined: Jan 2010
Reputation: 0
Location: USA
Post: #1
hi,

i apologize if this has been asked before; however, at the risk of annoying some devs I'd like to ask the following question: how do you change a view type when moving from item to item on a fixedlist?

Take a look at the screenshot below... i can change the viewtype if i click on, say, "Recently Added", "Apple Trailers", etc.; however, I'd like to be able to, "seamlessly", change the view when I move to another item without actually clicking it, but rather just moving to it.

I hope this makes sense.

[Image: screenshot004o.jpg]

Thanks in advance for any assistance.
(This post was last modified: 2011-05-11 05:29 by Dom DXecutioner.)
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #2
use <onfocus> instead of <onclick>
find quote
Dom DXecutioner Offline
Senior Member
Posts: 100
Joined: Jan 2010
Reputation: 0
Location: USA
Post: #3
Jezz_X Wrote:use <onfocus> instead of <onclick>

hey Jezz_x, thanks for the reply... i tried your suggestion but it did not work; does this code applies to Dharma or Pre-Dharma? I have to ask because I'm doing this for Dharma and the Xbox (though probably irrelevant to all).

Below is the code I've used...

PHP Code:
    <include name="PosterWrapView">

        <
control type="wraplist" id="300">
            <
posx>130</posx>
            <
posy>54</posy>
            <
width>320</width>
            <
height>148</height>
            <
visible>Container.Content(Movies) | Container.Content(VideoFiles)</visible>
            
            <
onup>-</onup>
            <
ondown>-</ondown>
            <
onleft>501</onleft>
            <
onright>501</onright>
            
            <
focusposition>2</focusposition>
            <
scrolltime>200</scrolltime>
            
            <
itemlayout height="24">
                <
control type="label">
                    <
posx>5</posx>
                    <
width>320</width>
                    <
font>font16</font>
                    <
info>ListItem.Label</info>
                    <
align>left</align>
                </
control>
            </
itemlayout>
            <
focusedlayout height="40">
                <
control type="label">
                    <
posx>5</posx>
                    <
width>320</width>
                    <
font>fontBold30</font>
                    <
info>ListItem.Label</info>
                    <
align>left</align>
                </
control>
            </
focusedlayout>
            
            <
content>
                <
item id="1">
                    <
label>All Movies</label>
                    <
onfocus>ActivateWindow(VideoLibrary,MovieTitles,Return)</onfocus>
                </
item>
                <
item id="2">
                    <
label>Recently Added</label>
                    <
onfocus>ActivateWindow(VideoLibrary,RecentlyAddedMovies,Return)</onfocus>
                </
item>
                <
item id="3">
                    <
label>Apple Trailers</label>
                    <
onfocus>XBMC.ActivateWindow(VideoLibrary,plugin://video/Apple Movie Trailers lite)</onfocus>
                
</item>
            </
content>
        </
control
(This post was last modified: 2011-05-11 05:51 by Dom DXecutioner.)
find quote
Jezz_X Offline
Team-XBMC Skinner
Posts: 5,289
Joined: Jun 2006
Reputation: 57
Location: Earth
Post: #4
yeah that wont work inside containers it only works in buttons
find quote
Dom DXecutioner Offline
Senior Member
Posts: 100
Joined: Jan 2010
Reputation: 0
Location: USA
Post: #5
Jezz_X Wrote:yeah that wont work inside containers it only works in buttons

fair enough... can you recommend a "work-around"?
find quote
AoN x KiLLa Offline
Junior Member
Posts: 11
Joined: Mar 2011
Reputation: 0
Post: #6
All you have to do is make a hidden button and set the onfocus to the location of the window for example "ActivateWindow(VideoLibrary,RecentlyAddedMovies,Return)" and give it an id and set the on up and ondown of the container that you want to move from to the buttons id.

Also nice theme can't wait to see more of it.

Edit: Just seen that won't work because your using a wraplist. I tryed making a theme like this before but, what I did was instead of making a wraplist I made it just change from window to window and the list would have to be just for decoration I guess IDK.
(This post was last modified: 2011-05-11 08:09 by AoN x KiLLa.)
find quote
mcborzu Offline
Skilled Skinner
Posts: 3,381
Joined: Feb 2009
Reputation: 15
Location: dsf
Post: #7
I have same type of code in some of my skins...It'll work:

Have your <onup> in the wraplist go to a group or button:
Quote:<onup>8240</onup>

then that group or button's <onfocus> do what you want:
Quote:<control type="group" id="8240">
<control type="button" id="8241">
<onleft>595</onleft>
<onright>595</onright>
<onup>stop</onup>
<onfocus>ActivateWindow(VideoLibrary,MovieGenres,return)</onfocus>
<visible allowhiddenfocus="true">ControlGroup(8240).HasFocus</visible>
</control>
</control>

[Image: widget]

Check out The Carmichael - A Skin For XBMC

Check out Night - A Skin For XBMC

Check out Unfinished - A Skin For XBMC
find quote
Dom DXecutioner Offline
Senior Member
Posts: 100
Joined: Jan 2010
Reputation: 0
Location: USA
Post: #8
AoN x KiLLa,

Thank you for the attempt... as for the theme, it's just new "nxe-metro" interface from the Xbox360, though not as fancy.

I don't work on it too much, just when i get a chance; you can see a few screenshots...

http://img535.imageshack.us/slideshow/we...t000lm.jpg

mcborzu Wrote:I have same type of code in some of my skins...It'll work:

Have your <onup> in the wraplist go to a group or button:

then that group or button's <onfocus> do what you want:

mcborzu,

Many thanks for your time; I kinda get what you're saying and will give it a try... how will the item know which button to focus on based on my selection from the wraplist?
find quote
AoN x KiLLa Offline
Junior Member
Posts: 11
Joined: Mar 2011
Reputation: 0
Post: #9
Hope you get more time to work on it! I will definitely being using it as my theme if you release it.
find quote