[Question] Conditions based on keystrokes
#1
just wondering if it is possible to have a condition based on if a keystroke is pressed, like up, down, left, right.

if not, is it possible to implement one somehow?

if this is possible somehow it would fix our coverflow problem we are having by using something like this
Quote:Container.Position(5) + Keystroke(right)

Link to coverflow problem topic
http://forum.xbmc.org/showthread.php?tid=64298



cheers
Reply
#2
The keystroke is an instantaneous event. You wouldn't get it for more than 1 frame, so I'm not sure how this will help.
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
#3
jmarshall Wrote:The keystroke is an instantaneous event. You wouldn't get it for more than 1 frame, so I'm not sure how this will help.

it is that a condition is met only if our coverflow selector is at a certain location (the edge of the list) and then the Left arrow is pressed. then the condition is met and an animation happens. but only if you press the key when your are at that location.
Reply
#4
Sounds like you really want an "onwrap" event?
Reply
#5
althekiller Wrote:Sounds like you really want an "onwrap" event?
if it does what chris said, yes we want. Big Grin
Reply
#6
althekiller Wrote:Sounds like you really want an "onwrap" event?
Ohh, if this means a condition that is true on the end of the whole list, and then jump to the first item.
It is not enough.

What we need is to know, when a new item becomes visible.
I use a panel container that shows 5 Items/Icons, and i want to know if i have focus on the fifth item and scroll to the 6th item, that becomes visible.
Like Page scrolling, but not a whole Page of items becomes visible, we need only one item.
Reply
#7
Can you not "just" have an image sitting on top of a standard panel to do that? You'd essentially just have a set of slide anims based on which position you're in? You don't need to know about onnext or onprev in this case, as when you're at the edges you're staying there, right?
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
#8
jmarshall Wrote:Can you not "just" have an image sitting on top of a standard panel to do that? You'd essentially just have a set of slide anims based on which position you're in? You don't need to know about onnext or onprev in this case, as when you're at the edges you're staying there, right?

I could give you a link to download and try the skin. then you can see the problem we are having and you can see the code as well. your help would be much appreciated!
Reply
#9
jmarshall Wrote:Can you not "just" have an image sitting on top of a standard panel to do that? You'd essentially just have a set of slide anims based on which position you're in? You don't need to know about onnext or onprev in this case, as when you're at the edges you're staying there, right?
I made a Animation like the Aeon Coverflow, 3 Control-Groups, one for the static elements, one for OnNext and one for OnPrevious.

The different between my and the Aeon Coverflow, Aeon use a Wraplist and i use a Panel.
In Aeon the Slide Animation is Visible if you click right or left (OnNext Onprevious).
I Use also OnNext Onprevious, the different is the Aeon Coverflow has only one fixed Focusposition and i have 6, because i use a Panel.
So i thought i have to set on which position in the panel the animation should run, also i add to OnNext the Position(5) and to Onprevious the Position(0). But that doesn't work.
But i only want to run the coverflow animation if i on the first Focusposition or on the last Focusposition in the panel, between first and last the Item should be static.

How you can see in this Video:
http://www.youtube.com/watch?v=LmQcG5NBr6E

The Animation not only runs on the first (Position(0)) position and on the last (Position(5)) position, it runs also on the second and fifth position (also an item to early).
Because the condition <Container.Position(5) + Container.OnNext> is true if you set focus from position 4 to 5 and if you set focu from 5 to 6 (6 is hidden). So the Animation runs an item to early. I only need to know if i set the focus from 5 to the next! (the same of the other side)

Here you can see the code:
http://pastebin.com/m5c9c87b5

sry for my poor english, it is difficult to describe it.

ps. what i need is a new condition that say me if a normal Panel not only change the focusposition of the visible static items, i need to know if a panel slides to the next or previous item on the edges.
Reply
#10
Doesn't OnNext/OnPrevious only get triggered when things are actually moving (i.e. when the panel is sliding a new item on screen?)

If so, I fail to see why you need to know what position you're in.

If not, that's what you need.
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
#11
jmarshall Wrote:Doesn't OnNext/OnPrevious only get triggered when things are actually moving (i.e. when the panel is sliding a new item on screen?)

If so, I fail to see why you need to know what position you're in.

If not, that's what you need.
Yes i want to know if a panel is sliding a new item on screen.
OnNext and Onprevious is triggered always you change the focus in the panel, also without sliding a new item on the screen.
Reply
#12
Right, then that's something we need to fix (or provide for)
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
#13
jmarshall Wrote:Right, then that's something we need to fix (or provide for)
cool, then i can hope for a solution.
Thanks jmarshall
Reply
#14
Try r26445 or later.

@Hitcher - this might fix the issue you were having a while back with your fixed list as well perhaps?

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
#15
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
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

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