|
SageTV Studio Discussion related to the SageTV Studio application produced by SageTV. Questions, issues, problems, suggestions, etc. relating to the Studio software application should be posted here. |
|
Thread Tools | Search this Thread | Display Modes |
#1
|
||||
|
||||
EnsureVisibilityForVariable in 2D tables
How does this method use the index (last parameter) for tables? If I've got a 3x3 table, and want a specific item to get focused in the middle location :
Code:
X X X X 0 X X X X I can't seem to get any rhyme or reason when calling this method on 2D tables.... btl.
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#2
|
|||
|
|||
Yep, that's index 4..... it works from top to bottom like:
x-0 x-3 x-6 x-1 o-4 x-7 x-2 x-5 x-8 As a previous post where I got shot down I'd get element 4 then use that to set the focus but no doubt that will be the wrong way to do it
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#3
|
||||
|
||||
Interesting - I would have counted left to right not top to bottom.
Next question - how do you get a table to be free-flowing enough that any element can be in any position? Code:
g h i j k l m n o Code:
i j k l m n o p q btl.
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#4
|
|||
|
|||
Actually it counts differently based on horziontal or vertical scrolling.
|
#5
|
|||
|
|||
Quote:
|
#6
|
|||
|
|||
So you want the focus item to be static in the center all the time and have items move around the focused item?
If so two methods come to mind.... 1. First set the focus to the item in the table.... then use listener widgets in your table (up,down,left and right) with a SendEvent to UI component to make the table scroll around, I guess you'd also have to use SetFocus as well to make sure the focus didn't stray away from the position you want it at. 2. Create your table with a UIValue attribute, add some up, down, left, right listener widgets to "RefreshArea" for the panel container in the next step (or you can use a FocusGained hook). Then create a panel widget outside of the table.... maybe using Auto arrange = SquareGrid although not essential. Now add 9 sub panels with each sub panel using a GetDataFromTableFocusedOffset(GetUIComponentForVariable("UIValue", "YourValue"), *, true) where * = table position. I used the second method to make my showcase view as seen in our thread and youtube clips.
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#7
|
||||
|
||||
I don't necessarily want the focus item to be static, I just want the location in the table of the elements to be fluid.
I've had good luck with center scrolling by having a table where each cell is a panel, and just there is a button only in the location where I want to be fixed. I haven't tried it with a 2d table though. Your method #2 looks interesting - I'll play around with that some and see where it will take me. btl.
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#8
|
||||
|
||||
Quote:
The items are then put into the table 3 per row, with the first index being a multiple of 3.... 0 1 2 3 4 5 6 7 8 etc. What if I want item 45 to be in the middle column - it's normally going to be in the first column since it's a multiple of 3. btl.
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#9
|
|||
|
|||
Quote:
This would be my prefered method as it makes more sense to see items run along the top, then middle and lastly the bottom..... Actually I can't get my head around this.... what happens if its wrapped? how will it know where to start the media item for the next row? Edit Scrap that.... it needs to scroll horizontally so I guess it will always be numbered top to bottom..... I think?
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders Last edited by jaminben; 04-06-2011 at 10:13 AM. |
#10
|
|||
|
|||
Quote:
|
#11
|
|||
|
|||
Quote:
Quote:
|
#12
|
|||
|
|||
The way you are doing it works but using the focusable condition in the item widget is a cleaner way. Then you don't have to draw a item widget and a panel widget just but your condition in the focusable condition box of the item widget. I can't believe Ben is not using this the methods he mentions above work but require way to much effort and extra coding
Last edited by PLUCKYHD; 04-06-2011 at 10:22 AM. |
#13
|
|||
|
|||
Quote:
So basically if I use my method 2 from above and do what bialio suggested and manually place my items in panels outside of the table and in multiples of 3 it will work?
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#14
|
|||
|
|||
See above post to bialo. If you are manually placing your items you don't need a table...
|
#15
|
|||
|
|||
Quote:
Either way I can't be arsed to make a wall which would work like that at this point as it would take alot of time getting the animations to work nicely for each panel.
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#16
|
||||
|
||||
Quote:
I have it like this (in this example we've got a cover flow type table - 5 items on screen, fixed focus at location 2): Code:
Array Table Cell Panel if (TableRow - HScrollIndex) > 2 Item Panel2 (has any UI elements in it) Action Chains Hooks etc > else Panel2 (link to Panel2)
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient Last edited by bialio; 04-06-2011 at 10:53 AM. |
#17
|
|||
|
|||
Thats not the bit I was referring to.... I ment the bit where you said about doing it like:
0 1 2 3 4 5 6 7 8 Not that it matters as it would be way to much work to get it looking good. Although in saying that I do already use the example you just posted in a standard poster flow view except I pull out the focused item and place it in its own panel outside the table so it can be animated independently (poping effect without the table scroll animation) which works pretty good
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders Last edited by jaminben; 04-06-2011 at 11:13 AM. |
#18
|
||||
|
||||
AH - that's a nice trick. Sometimes the animation effect of the table does get a bit old....
btl.
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
#19
|
|||
|
|||
Quote:
I wouldn't actually mind having a go at making a screen for phoenix just to see how it works (although I wouldn't spend too much time on it).... thats if you ever get bored with it I guess I could grab the SageTVPluginsDev.xml from you know where if I really wanted it (if thats the most recent version?)
__________________
Server - Win7 64bit, 2.4Ghz Intel Core 2 Duo, TBS 6284 PCI-E Quad DVB-T2 Tuner, 3 x HD200 & 1 x HD300 extenders |
#20
|
||||
|
||||
It is.
__________________
PHOENIX 3 is here! Server : Linux V9, Clients : Win10 and Nvidia Shield Android Miniclient |
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Tables and animation | Ikarius | SageTV Studio | 3 | 09-14-2009 05:55 AM |
Creating Arrays for tables | PLUCKYHD | SageTV Studio | 37 | 05-31-2009 12:12 AM |
Resizing Tables | bialio | SageTV Studio | 5 | 01-22-2008 01:17 PM |
Troubling Tables | kuch68 | SageTV Studio | 5 | 09-13-2006 01:06 PM |