NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 5 6 7 8 9 … 93 Next »
Noobie Here!

 
  • 0 Vote(s) - 0 Average
Noobie Here!
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#51
2014-03-15, 12:41 AM
Code:
// create button strip, but hide it by default
            uiButtonStrip = new UiButtonStrip("ButtonList", new string[] {"Test1", "Test2", Test3"}, this, new Hashtable(), skinHelper);

Override the ButtonStripCallback() callback method, so you can handle the button clicks ("Test1", "Test2", "Test3").
jrockow
Offline

Senior Member

Posts: 718
Threads: 112
Joined: Nov 2005
#52
2014-03-17, 09:28 PM
I've noticed in some of your popup skins "@controlSelected" and "@controlNotSelected".
Can you explain how you use these?

How can I return the value of the "OID" in the selected object?
(previously I issued the "showTimes.Add(item)" command to write it there)

Having a heck of a time getting anything going with your instructions for adding a second buttonlist.

Not sure what you mean by your last thread. Sorry for being such a noobie.
If you could provide any more details I would appreciate it!
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#53
2014-03-17, 09:36 PM
jrockow Wrote:I've noticed in some of your popup skins "@controlSelected" and "@controlNotSelected".
Can you explain how you use these?
The list control set these depending on if the control is selected or not. ie, so the skin file can specify a slightly different highlighted row look depending on if the control is selected to receive input (vs a list which is on the screen, but not the selected/active control).

Quote:How can I return the value of the "OID" in the selected object?
(previously I issued the "showTimes.Add(item)" command to write it there)
You can use myList.GetSelectedObject() to get the currently selected item.

Quote:Not sure what you mean by your last thread. Sorry for being such a noobie.
If you could provide any more details I would appreciate it!
Which thread?
jrockow
Offline

Senior Member

Posts: 718
Threads: 112
Joined: Nov 2005
#54
2014-03-17, 11:37 PM
#51
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#55
2014-03-17, 11:45 PM
It'd pretty much the same as adding a list control.

Create an instance of the UiButton strip when you create your other list controls (usually in Initialise() method)
Code:
// create button strip, but hide it by default
            mySecondButtonStrip = new UiButtonStrip("ButtonList", new string[] {"Test1", "Test2", Test3"}, this, new Hashtable(), skinHelper);

Add it to the render list:
Code:
public List<UiElement> GetRenderList()
        {
            List<UiElement> renderList = new List<UiElement>();
            renderList.AddRange(listShowNames.GetRenderList());
            renderList.AddRange(listShowTimes.GetRenderList());
            renderList.AddRange(mySecondButtonStrip.GetRenderList());
            return renderList;
        }

Get notifications of button presses in the ButtonStripCallback() method.
Code:
public override void ButtonStripCallback(string button)
        {
            if (button == "Test1")
            {
                 ...do something...
            }
            else if (button == "Test2")
            {
                 ...do something else...
            }
            else
            {
                  base.ButtonStripCallback(button);
            |}
        }
jrockow
Offline

Senior Member

Posts: 718
Threads: 112
Joined: Nov 2005
#56
2014-03-18, 10:47 AM
Still no joy with the extra button list.
Now whenever I try to run the plugin nothing happens.
NPVR just stays on the main menu screen.


These are the 2 lines of code I added......(in addition to the ButtonStripCallback sub)

Dim ExtraButtonStrip = New UiButtonStrip("MyExtraButtonList", New String() {"Test1"}, Me, New Hashtable(), skinHelper)
renderList.AddRange(ExtraButtonStrip.GetRenderList())


This is my buttonlist element that I added to the skin file.....

<Element name="MyExtraButtonList" location="0,45" size="15,5" alpha="255">
<RoundedRect visible="@button1Selected" location="2,4" size="18,75.28" fillColor="#444444" borderColor="Transparent" radius="0.52" borderWidth="0.15"/>
<Text text="@button1" name="@button1" location="2,0" size="16,80" font="DefaultReverseSmall" align="Center" valign="Center"/>
</Element>





Also, no progress yet with listShowTimes.GetSelectedObject().

I was testing this statement earlier and couldn't figure out how to get it working.
I'm trying to single out the OID, which is actually hidden in my skin file.
I want to use the OID to get the epg events of the selected show.

<Element name="ShowTimeListItemSelected" location="30,48" size="70,4" alpha="200" alphaFade="true">
<RoundedRect location="2,1" size="96,98" fillColor="White" borderColor="Transparent" radius="1" borderWidth="0"/>
<Text text="@showtime" location="3,0" size="50,100" font="DefaultReverse" align="Left" valign="Center"/>
<Text text="@date" location="55,0" size="75,100" font="DefaultReverse" align="Left" valign="Center"/>
<!-- <Text text="@oid" location="35,0" size="94,100" font="DefaultReverse" align="Left" valign="Center"/> -->
</Element>
jrockow
Offline

Senior Member

Posts: 718
Threads: 112
Joined: Nov 2005
#57
2014-03-18, 10:51 AM
For what it's worth, if I remove the renderlist line I still can't get the plugin to run.
I guess it has to do with the DIM line?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#58
2014-03-18, 05:01 PM
You'd probably need to send me your code to try here. I can't guess what you've done wrong.
jrockow
Offline

Senior Member

Posts: 718
Threads: 112
Joined: Nov 2005
#59
2014-03-18, 06:17 PM
I'll keep working on it for a little while longer, but if I send it, you realize it's all in VB?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,807
Threads: 769
Joined: Nov 2003
#60
2014-03-18, 06:29 PM
jrockow Wrote:but if I send it, you realize it's all in VB?
Yeah, I'll cringe, but I should be able to follow it.
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (17): « Previous 1 … 4 5 6 7 8 … 17 Next »
Jump to page 


  • View a Printable Version
  • Subscribe to this thread
Forum Jump:

© Designed by D&D, modified by NextPVR - Powered by MyBB

Linear Mode
Threaded Mode