[Question] Conditions based on keystrokes
#16
jmarshall Wrote:Actually, don't bother - that change will be reverted as it'll break other stuff.

Does it work if you use 6/-1 rather than 5/0 for your positions?

Cheers,
Jonathan
Sry, it doesn't work, if i set the conditions to 6/-1 it shows nothing, looks like the condition isn't true

Also in the fixedlist with <movement> (Hitchers Problem) nothing changed.

ps.: i use svn build from ikon r26459
Reply
#17
Provide me with the skin code please. Ideally something that's nice and easy for me to play around with - I don't want to have to be diving through a whole bunch of includes to reproduce the issue Smile

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
#18
jmarshall Wrote:Provide me with the skin code please. Ideally something that's nice and easy for me to play around with - I don't want to have to be diving through a whole bunch of includes to reproduce the issue Smile

Cheers,
Jonathan
This coveflow effect has many lines of code Wink its difficult to reduce it to a few lines.
I do send you a PM with a link to the source.

a small overview:
PHP Code:
<!--    not OnNextnot OnPrevious    -->
<
control type="group" id="326">
    <
visible>![Container(313).Position(4) + Container(313).OnNext] + ![Container(313).Position(0) + Container(313).OnPrevious]</visible>
    
</
control>

<!--    
OnNext    -->
<
control type="group" id="327">
    <
visible>Control.IsVisible(313) + Container(313).Position(4) + Container(313).OnNext</visible>
    
</
control>

<!--    
OnPrevious    -->
<
control type="group" id="328">
    <
visible>Control.IsVisible(313) + Container(313).Position(0) + Container(313).OnPrevious</visible>
    
</
control>

<
control type="panel" id="313">
    <
posx>55</posx>
    <
posy>RA_IconMusic_PosY</posy>
    <
width>1170</width>
    <
height>255</height>
    <
onleft>309</onleft>
    <
onright>-</onright>
    <
onup>303</onup>
    <
ondown>303</ondown>
    <
scrolltime>150</scrolltime>
    <
orientation>horizontal</orientation>
    <
preloaditems>2</preloaditems>
    
    <
itemlayout height="255" width="234">
        <
control type="image">
            <
posx>23</posx>
            <
posy>0</posy>
            <
width>RA_IconMusic_Width</width>
            <
height>RA_IconMusic_Heigth</height>
            <
info>ListItem.Thumb</info>
            <
aspectratio>scale</aspectratio>
            <
visible>Skin.HasSetting(RecentlyAdded_CoverFlowOff)</visible>
        </
control>
    </
itemlayout>
    <
focusedlayout height="255" width="234">
        <
control type="image">
            <
posx>23</posx>
            <
posy>0</posy>
            <
width>RA_IconMusic_Width</width>
            <
height>RA_IconMusic_Heigth</height>
            <
info>ListItem.Thumb</info>
            <
aspectratio>scale</aspectratio>
            <
visible>Skin.HasSetting(RecentlyAdded_CoverFlowOff)</visible>
        </
control>
    </
focusedlayout>
</
control
Reply
#19
I know what the problem is:

1. Container.OnNext triggers for a single frame.
2. Container.Position gives you the current focus.
3. When scrolling, Container.Position is updated _after_ the scroll has been completed (or at least a frame after the scrolling starts)
4. When not scrolling, Container.Position is updated immediately.

Thus, when not scrolling, the position increases by 1, thus if you're in position 4 and press right, container.position will read 5 immediately. When scrolling, if you're in position 5 and press right, container.position will read 5 until the scrolling actually gets under way. Hence, you're described problem.

The only way to fix this without breaking other stuff is to have two new events Container.OnScrollNext and Container.OnScrollPrev.

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
#20
jmarshall Wrote:I know what the problem is:

1. Container.OnNext triggers for a single frame.
2. Container.Position gives you the current focus.
3. When scrolling, Container.Position is updated _after_ the scroll has been completed (or at least a frame after the scrolling starts)
4. When not scrolling, Container.Position is updated immediately.

Thus, when not scrolling, the position increases by 1, thus if you're in position 4 and press right, container.position will read 5 immediately. When scrolling, if you're in position 5 and press right, container.position will read 5 until the scrolling actually gets under way. Hence, you're described problem.

The only way to fix this without breaking other stuff is to have two new events Container.OnScrollNext and Container.OnScrollPrev.

Cheers,
Jonathan
Thanks, I think I finally understand what's happening.
Reply
#21
As of r26519 we now have Container.OnScrollNext/OnScrollPrevious that *should* do the trick. Untested though.

Note that this is in addition to Container.OnScrolling which triggers only after the user has been scrolling through more than one item.

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
#22
jmarshall Wrote:As of r26519 we now have Container.OnScrollNext/OnScrollPrevious that *should* do the trick. Untested though.

Note that this is in addition to Container.OnScrolling which triggers only after the user has been scrolling through more than one item.

Cheers,
Jonathan
very cool, i will test it, if i have the right svn build for windows.
Reply
#23
jmarshall Wrote:As of r26519 we now have Container.OnScrollNext/OnScrollPrevious that *should* do the trick. Untested though.

Note that this is in addition to Container.OnScrolling which triggers only after the user has been scrolling through more than one item.

Cheers,
Jonathan
Sry, but it looks like that OnScollNext/OnScrollPrevious do the same as OnNext/OnPrevious in the Panel.
Reply
#24
Confirm it by putting an image that pops up if OnScrollNext is set (obviously with a hidden anim on it otherwise it'll flash up for just 1 frame).
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
#25
jmarshall Wrote:Confirm it by putting an image that pops up if OnScrollNext is set (obviously with a hidden anim on it otherwise it'll flash up for just 1 frame).
The image is always visible, if i change the focusposition to the next item in the panel.
I use the svn r26540-trunk.

PHP Code:
<control type="panel" id="53">
                <
description>Viewtype Wall</description>
                <
viewtype label="31253">icon</viewtype>
                <
posx>45</posx>
                <
posy>100</posy>
                <
width>1190</width>
                <
height>680</height>
                <
orientation>vertical</orientation>
                <
onup>53</onup>
                <
ondown>53</ondown>
                <
onleft>9000</onleft>
                <
onright>9000</onright>
                <
scrolltime>200</scrolltime>
                <
preloaditems>2</preloaditems>

                <
itemlayout height="170" width="170">
                    <
control type="image">
                        <
posx>2</posx>
                        <
posy>2</posy>
                        <
width>166</width>
                        <
height>166</height>
                        <
texture>$INFO
[ListItem.Icon]</texture>
                        <
aspectratio>scale</aspectratio>
                    </
control>
                </
itemlayout>
                <
focusedlayout height="170" width="170">
                    <
control type="image">
                        <
posx>2</posx>
                        <
posy>2</posy>
                        <
width>166</width>
                        <
height>166</height>
                        <
texture>$INFO
[ListItem.Icon]</texture>
                        <
aspectratio>scale</aspectratio>
                    </
control>
                </
focusedlayout>
            </
control>

<
control type="image">
                <
description>Bottom Gradient</description>
                <
posx>0</posx>
                <
posy>610</posy>
                <
width>1280</width>
                <
height>110</height>
                <
texture>viewtype_wall/Wall_BottomGradient.png</texture>
                <
aspectratio>scale</aspectratio>
                <
visible>Container(53).OnScrollNext</visible>
                <
animation effect="fade" start="100" end="0" time="1000">Hidden</animation>
            </
control
i test it in a simple wall view for pictures

ps.: another feature request: maybe it is possible to get a new <info> like "Container.ListItem.IconPosition(**)", if i use a panel for coverflow effects, i must define images for each focus position, example a panel with 6 item (6 focus positions) i have to define 6x6=36 images, because i must use the offset in ListItem(**).Icon. That feature will reduce the code to a minimum.
Reply
#26
I'm having similar problems trying to fade a label using Container(id).OnScrollNext/OnScrollPrevious or Container(id).OnNext/OnPrevious when selecting the next/previous item in a wrap or fixedlist.
I can get it to fade if I use Container(id).Scolling so I know the fade control is working but it does nothing if I use Next/Prev or ScrollNext/ScrollPrev.

EDIT: Ignore me, I had the fade start and end values the wrong way around. Works using Container(id).OnNext/OnPrevious.
Reply
#27
@eumel: it works perfectly fine for me. I added this:

Code:
<control type="image">
      <description>CHECKSCROLLING</description>
      <posx>500</posx>
      <posy>250</posy>
      <width>300</width>
      <height>300</height>
      <texture>HomeBlade_middle.png</texture>
      <visible>Container(9000).OnScrollNext || Container(9000).OnScrollPrevious</visible>
      <animation effect="fade" start="100" end="100" time="10000">Hidden</animation>
    </control>

to the bottom of Home.xml in Confluence. The image only shows up when the fixed list is actually scrolling, not otherwise.

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
#28
jmarshall Wrote:@eumel: it works perfectly fine for me. I added this:

Code:
<control type="image">
      <description>CHECKSCROLLING</description>
      <posx>500</posx>
      <posy>250</posy>
      <width>300</width>
      <height>300</height>
      <texture>HomeBlade_middle.png</texture>
      <visible>Container(9000).OnScrollNext || Container(9000).OnScrollPrevious</visible>
      <animation effect="fade" start="100" end="100" time="10000">Hidden</animation>
    </control>
to the bottom of Home.xml in Confluence. The image only shows up when the fixed list is actually scrolling, not otherwise.

Cheers,
Jonathan
That could be true, but it doesn't work for a "Panel".

I use the nightlie builds from here
http://mirrors.xbmc.org/nightlies/win32/
for Windows 7. (current: 26540)
Reply
#29
What platform are you using Jonathan?

I just tried this on Windows build SVN:26459 and it didn't work.
Reply
#30
The only difference that i can see between OnNext and OnScrollNext is, that OnNext is not true if i jump in the fixedlist from the last to the first item.

I think there is a bit mixed up, I need a condition that allow me to know when a Panel shows the next line/item.

On the other side, we need a condition for Fixedlist/Wraplist, if they use <movement> that allow us to know when we change the focusposition in the list. (OnNext/OnPrevious work only on the set <focusedposition> not above or below).

ps.: sorry if i'm not understandable, but my english is not the best
Reply

Logout Mark Read Team Forum Stats Members Help
[Question] Conditions based on keystrokes0