SageTV Community  

Go Back   SageTV Community > SageTV Development and Customizations > SageTV Studio
Forum Rules FAQs Community Downloads Today's Posts Search

Notices

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.

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 11-16-2005, 04:29 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Tables, Items, Focus (and Themes?)

Howdy all, I've been trying to rework the main menu, and I'm making progress, but I'm having a bit of trouble now. What I've got so far is a main menu defined by a list, made out of a table.

Now onto the snag(s):

1) How do you force the focused item/element to be in a certain location in the table. For example, how do you get the focused element to always be at location 4 of 8?

It seems like EnsureVisibilityForVariable(Item, ItemValue, 4) would do that....

2) A bit tougher maybe . Can you select a different theme based on focus (and how)? Or how do you make an item look different if focused?

3) The killer probably: How do you change the size of a TableComponent based on focus? Or do you need to, can an item extend outside a TableComponent?

-edit

FWIW, I feel stupid, but I figured out how to figure out if an Item is focused. Use "Focused"! DOH!!!!

-edit 2: Looks like this might be a core issue(s), I've managed to get it all to work, but not reliably or under all circumstances:
http://forums.sage.tv/forums/downloa...?do=file&id=34

Last edited by stanger89; 11-16-2005 at 05:13 PM.
Reply With Quote
  #2  
Old 11-16-2005, 10:49 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
I don't have a comment for #1 & I think you said you figured out #2, so...

Quote:
3) The killer probably: How do you change the size of a TableComponent based on focus? Or do you need to, can an item extend outside a TableComponent?
I think you don't, and no. You can draw each table entry such that they don't all fill the entire space allocated, then draw one at the full size, so one is larger than the others, but the table cells themselves are all given the same size as far as I know.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #3  
Old 11-17-2005, 08:42 AM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
It's not that I'm really expecting anything....but...I downloaded your .stv and I don't really see what it is suppose to do. Everything looks like the standard. Is there anything else I'm suppose to do to make it do......something?

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #4  
Old 11-17-2005, 11:13 AM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
That's because the menu I'm playing with is only accessible via Studio Actually both the menus I played with.
Reply With Quote
  #5  
Old 11-17-2005, 12:58 PM
gplasky's Avatar
gplasky gplasky is offline
SageTVaholic
 
Join Date: Jul 2003
Location: Howell, MI
Posts: 9,203
Ok. Then Studio it is. Time to get my hands dirty.

Gerry
__________________
Big Gerr
_______
Server - WHS 2011: Sage 7.1.9 - 1 x HD Prime and 2 x HDHomeRun - Intel Atom D525 1.6 GHz, Acer Easystore, RAM 4 GB, 4 x 2TB hotswap drives, 1 x 2TB USB ext Clients: 2 x PC Clients, 1 x HD300, 2 x HD-200, 1 x HD-100 DEV Client: Win 7 Ultimate 64 bit - AMD 64 x2 6000+, Gigabyte GA-MA790GP-DS4H MB, RAM 4GB, HD OS:500GB, DATA:1 x 500GB, Pace RGN STB.
Reply With Quote
  #6  
Old 11-17-2005, 04:20 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Quote:
Originally Posted by Opus4
I don't have a comment for #1 & I think you said you figured out #2, so...
FWIW, #1 I'd love to see Jeff weigh in on, as I don't think it's a bug, per se. It works some of the time, but it's behavior is odd when you've got a scrolling menu like that. Ideal behavior (IMO ) would be for it to always set it where you tell it to, right now it appears to do it only when it thinks it needs to.

#2 I figured out a way to accomplish what I wanted, which is a different appearance for the focused element.

Quote:
I think you don't, and no. You can draw each table entry such that they don't all fill the entire space allocated, then draw one at the full size, so one is larger than the others, but the table cells themselves are all given the same size as far as I know.

- Andy
But #3 is really preventing me from doing what I want.
Reply With Quote
  #7  
Old 11-17-2005, 04:39 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
OK, so I do have a comment for numbers 1 & 3... I almost posted this in my first reply, so I guess I should have: since you really only want 1 item selectable (the center one) and that won't work too well when you point to the other ones w/a mouse anyway, then either don't use a table or use index numbers in the table instead of the actual menu items.

Either via a set of panels + one Item widget (in a table or as individual widgets), draw the top & bottom portions via Panels w/one Item in the middle. Give them numbers 0-6 (or 0-7; however many items you want on the screen, of course). Use an array of menu items. Separately, track the top index (0 based) of which menu item is shown in the top position. Then, for each panel/item widget, display menu item number = (widget position number + top index) mod (count of menu items).

You will have to have listeners to handle up/down/etc., which will then simply adjust the top index & refresh all the menu widgets. This has a problem with mouse input, where it is hard to select the items outside the middle, but you could add up/down arrows for mouse usage. The mouse scroll wheel should work as arrow/page up/down keys.

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #8  
Old 11-17-2005, 04:40 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
I had it like that, but it's a PIA and not very elegant
Reply With Quote
  #9  
Old 11-17-2005, 04:48 PM
Opus4's Avatar
Opus4 Opus4 is offline
Administrator
 
Join Date: Sep 2003
Location: NJ
Posts: 19,624
If you use an array of index numbers in the table, it would be fairly simple to set up. Actually, using themes & a list of panels, it would be fairly simple to set up too, where each panel had a local variable defining its position number -- wih this method, the Panels could have 1 size & the Item could be another.

Did you just not like the way it looks, or what? i.e.: what part was "not very elegent"?

- Andy
__________________
SageTV Open Source v9 is available.
- Read the SageTV FAQ. Older PDF User's Guides mostly still apply: SageTV V7.0 & SageTV Studio v7.1.
- Hauppauge remote help: 1) Basics/Extending it 2) Replace it 3) Use it w/o needing focus
- HD Extenders: A) FAQs B) URC MX-700 remote setup
Note: This is a users' forum; see the Rules. For official tech support fill out a Support Request.
Reply With Quote
  #10  
Old 11-17-2005, 05:25 PM
stanger89's Avatar
stanger89 stanger89 is offline
SageTVaholic
 
Join Date: May 2003
Location: Marion, IA
Posts: 15,188
Oh, basically the way I want to do it, requires 1 list and 1 theme. (Themes are cool once you start to get the hang of them )

The alternative, is 1 item, with a theme, and at least 2 more panels, if not more and at least another theme. The way I had it before, required an index attribute, 7 pannels (for the non-selected), 2 themes, and an item.
Reply With Quote
  #11  
Old 12-18-2007, 04:10 PM
Crashless's Avatar
Crashless Crashless is offline
Sage Icon
 
Join Date: Oct 2003
Location: Los Angeles, CA
Posts: 1,224
Are there any new ways to solve this issue? That is, to have the focused cell stay at a particular row?

I'm trying to re-code my main menu, so that it can take advantage of the built in table wrapping animations and I've gotten everything worked out except how to maintain the focused item in the middle of my 5 row table.

I've tried incrementing the VScollIndex and offsetting from the first item in the table, but I didn't fully understand how Stanger was trying to use EnsureVisibilityForVariable(Item, ItemValue, 4), so I don't know where that would appear in my code tree.

Thoughts?
__________________
Give the Meekell STV a try!
Reply With Quote
  #12  
Old 12-20-2007, 10:20 AM
Crashless's Avatar
Crashless Crashless is offline
Sage Icon
 
Join Date: Oct 2003
Location: Los Angeles, CA
Posts: 1,224
Nevermind. I was able to come up with an alternative that used AnimateTransition(), container widgets, and index offsets. It isn't as simple, but it gives me a LOT more control over what the actual animation looks like.

FWIW, it took me a while to figure out that while you put "LayerForeground" in the Animate property of an item, you only call "Foreground" in the Animate() widget.

Also, I was pulling my hair out trying to figure out why I couldn't get the Animate() call to find a widget I was animating. Now that I realize Themes can set Animate item properties too, my hair will hopefully grow back.

All that said (last finishing sentence, I promise) WOW!!! Now that I think I understand how the Animate() and AnimateTransition() work, I have some really cool ideas. STVs got fun again for me. Thanks!

Edit: Oh yeah, Stanger's zip file seems to be corrupted. I don't think it used to be that way. Just thought I'd mention it.
__________________
Give the Meekell STV a try!

Last edited by Crashless; 12-20-2007 at 10:33 AM. Reason: Stanger's zip
Reply With Quote
  #13  
Old 12-20-2007, 11:03 AM
MeInMaui's Avatar
MeInMaui MeInMaui is offline
SageTVaholic
 
Join Date: Feb 2005
Location: Maui. HI
Posts: 4,203
@Crashless

Could you give more detail about how you accomplished keeping the focused item at a fixed location? I've been trying to do this with little to no luck. Your insights would be greatly appreciated.

Aloha,
Mike
Reply With Quote
  #14  
Old 12-20-2007, 11:31 AM
Crashless's Avatar
Crashless Crashless is offline
Sage Icon
 
Join Date: Oct 2003
Location: Los Angeles, CA
Posts: 1,224
Sent a PM - I'll email it directly. WAY easier than translating Studio code to the forum.

For the archive: This code will me in my next release - v0.7.
__________________
Give the Meekell STV a try!
Reply With Quote
  #15  
Old 12-20-2007, 11:59 AM
Crashless's Avatar
Crashless Crashless is offline
Sage Icon
 
Join Date: Oct 2003
Location: Los Angeles, CA
Posts: 1,224
OK fine. Here's a gif of the code.

Sorry it's not too clean, I only got it to work last night around 1am - I can never sleep until I reach a breaking point. it only works down right now.

All the "Selections" Containers are in the Foreground layer, which is set via a theme. A 'down' listener triggers the animation code in addition to the down arrow button. Not shown here is the code that sets each button based on ItemIndex. My current STV (v0.6.1) has that in it now.
Attached Images
File Type: gif animatecode.gif (31.5 KB, 232 views)
__________________
Give the Meekell STV a try!
Reply With Quote
Reply


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -6. The time now is 06:15 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2023, vBulletin Solutions Inc.
Copyright 2003-2005 SageTV, LLC. All rights reserved.