NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Add-ons (3rd party plugins, utilities and skins) Old Stuff (Legacy) GB-PVR Support (legacy) v
« Previous 1 … 584 585 586 587 588 … 1231 Next »
drawing elements

 
  • 0 Vote(s) - 0 Average
drawing elements
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#1
2007-03-07, 07:55 PM
I want to consolidate the OSD skin.xml, so doing things like

Code:
<CompositeImage name="ChannelControls" size="70,35">
    <DrawImage filename="pbnextchbtn.png" loc="0,0" size="35,35"/>
    <Element name="NextChannel" loc="0,0" size="35,35"/>
    <DrawImage filename="pbprevchbtn.png" loc="35,0" size="35,35"/>
    <Element name="PrevChannel" loc="35,0" size="35,35"/>
</CompositeImage>

<CompositeImage name="PlayControls" size="175,35">
    <DrawImage filename="pbsbbtn.png" loc="0,0" size="35,35"/>
    <Element name="SkipBack" loc="0,0" size="35,35"/>
    <DrawImage filename="pbrwbtn.png" loc="35,0" size="35,35"/>
    <Element name="Rewind" loc="35,0" size="35,35"/>
    <DrawImage filename="pbpausebtn.png" loc="70,0" size="35,35"/>
    <Element name="Pause" loc="70,0" size="35,35"/>
    <DrawImage filename="pbffbtn.png" loc="105,0" size="35,35"/>
    <Element name="FastForward" loc="105,0" size="35,35"/>
    <DrawImage filename="pbsfbtn.png" loc="140,0" size="35,35"/>
    <Element name="SkipForward" loc="140,0" size="35,35"/>
</CompositeImage>

<CompositeImage name="TimeshiftControls" size="720,480">
    <DrawImage filename="..\_res\osd_controls.png" size="720,20" loc="0,332"/>

    <DrawCompositeImage name="ChannelControls" loc="170,336" size="70,35"/>

    <DrawCompositeImage name="PlayControls" loc="260,336" size="175,35"/>

    <DrawImage filename="pbexitbtn.png" loc="458,334" size="74,35"/>
    <Element name="Exit" loc="458,336" size="74,35"/>
</CompositeImage>

but it seems like I cant draw elements using "DrawCompositeImage" is there a way to do this?

also regarding the OSD, what is the point of the "-selected" images, is there some way that they are used?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,806
Threads: 769
Joined: Nov 2003
#2
2007-03-07, 08:05 PM
Quote:but it seems like I cant draw elements using "DrawCompositeImage" is there a way to do this?
You should be able to, but I havnt tried it. It's just using the same skinhelper functions as everywhere else.

Quote:also regarding the OSD, what is the point of the "-selected" images, is there some way that they are used?
They're not used these days. The OSD used to work differently a long time back, allowing you to navigate between the buttons with the up/down/left/right/enter keys.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,806
Threads: 769
Joined: Nov 2003
#3
2007-03-07, 08:11 PM
I just tried adding the following to "LivePreview" composite image and it show up fine.

<DrawCompositeImage name="TimeshiftControls" loc="0,0" size="720,480"/>
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#4
2007-03-07, 08:24 PM
sub Wrote:You should be able to, but I havnt tried it. It's just using the same skinhelper functions as everywhere else.
oops, I guess I forgot to say it above, but it does not work, I cant click on the buttons, they ignore my presses.

the best way to illustrate this is with the timeline
Code:
<CompositeImage name="Timeline" size="720,70">
    <DrawImage filename="..\_res\osd_top.png" size="720,70" loc="0,0"/>
    <DrawText text="@positionText" loc="110,37" size="100,30" textStyle="OSDText" align="Left" visible="true"/>
    <DrawText text="@durationText" loc="530,37" size="100,30" textStyle="OSDText" align="Left" visible="true"/>
    <Element name="timelineGraphic" loc="200,40" size="320,50" />
    <DrawText text="@subtitlesEnabled" loc="350,5" size="350,30" textStyle="OSDText" align="Right" visible="true"/>
</CompositeImage>

<CompositeImage name="Timeshift" size="720,480">
    <DrawImage filename="..\_res\osd_bottom.png" size="720,130" loc="0,350"/>
    <DrawImage filename="@channelIcon" loc="625,414" size="60,45" visible="true"/>
    <DrawText text="@title" loc="30,365" size="500,30" textStyle="OSDText" align="Left"/>
    <DrawText text="@description" loc="30,400" size="600,75" textStyle="OSDText" align="Left"/>
    <DrawText text="@time" loc="500,370" size="190,30" textStyle="OSDText" align="Right"/>
    <DrawText text="@aspectRatio" visible="@aspectRatioChanged" loc="20,5" size="350,30" fillColor="White" borderColor="Black" outlineWidth="2" textStyle="OSDText" align="Left"/>

    <!-- timeline -->
    <DrawCompositeImage name="Timeline" loc="0,0" size="720,70"/>
</CompositeImage>
results in the picture that is attached

sub Wrote:They're not used these days. The OSD used to work differently a long time back, allowing you to navigate between the buttons with the up/down/left/right/enter keys.
ok thanks for the info, so I can just delete them from my skin then?


another quick question about DrawCompositeImage, how efficient is it? if I use multiple nested calls to it, will it produce a significant increase in processing required? eg,
Code:
<CompositeImage name="ButtonTxt" size="214,43">
    <DrawText text="@buttonText" loc="4,2" size="200,30" textStyle="ButtonText" align="Center"/>
</CompositeImage>

<CompositeImage name="NormalButton" size="214,43">
    <DrawImage filename="..\_res\btn.png" size="214,43" loc="0,0"/>
    <DrawCompositeImage name="ButtonTxt" loc="0,0" size="214,43"/>
</CompositeImage>

<CompositeImage name="SelectedButton" size="214,43">
    <DrawImage filename="..\_res\btn_sel.png" size="214,43" loc="0,0"/>
    <DrawCompositeImage name="ButtonTxt" loc="0,0" size="214,43"/>
</CompositeImage>

<CompositeImage name="PopupSelectedButton" size="214,43">
    <DrawImage filename="..\_res\btn_sel_r.png" size="214,43" loc="0,0"/>
    <DrawCompositeImage name="ButtonTxt" loc="0,0" size="214,43"/>
</CompositeImage>

<CompositeImage name="NormalButtonImage" size="214,43">
    <DrawCompositeImage name="NormalButton" loc="0,0" size="214,43"/>
</CompositeImage>

<CompositeImage name="SelectedButtonImage" size="214,43">
    <DrawCompositeImage name="SelectedButton" loc="0,0" size="214,43"/>
I am sure you can see the reasons I would want to do this.
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,806
Threads: 769
Joined: Nov 2003
#5
2007-03-07, 08:37 PM
Quote:
sub Wrote:You should be able to, but I havnt tried it. It's just using the same skinhelper functions as everywhere else.
oops, I guess I forgot to say it above, but it does not work, I cant click on the buttons, they ignore my presses.
Ah, I see. You'll probably just have to live with this limitation, and copy the image definitions rather than using the <DrawCompositeImage> tag, otherwise the GUI is unable to find the locations of the specific elements. Sorry.

Quote:another quick question about DrawCompositeImage, how efficient is it? if I use multiple nested calls to it, will it produce a significant increase in processing required?
There is no significant overhead associated with using this.
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#6
2007-03-07, 08:44 PM (This post was last modified: 2007-03-07, 08:45 PM by Ted the Penguin.)
sub Wrote:Ah, I see. You'll probably just have to live with this limitation, and copy the image definitions rather than using the <DrawCompositeImage> tag, otherwise the GUI is unable to find the locations of the specific elements. Sorry.

the images actually work fine they show up exactly where I tell them to, its the elements that dont like to render properly, but as you said, I can live with it... just wanted to make the OSD skin file cleaner.
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#7
2007-03-07, 09:07 PM
sub Wrote:There is no significant overhead associated with using this.

what if I go and start adding named values in there, and make a little programming language out of this,
Code:
<NamedValues>
  <NamedValue name="ButtonWidth" value="214" />
  <NamedValue name="ButtonHeight" value="43" />
</NamedValues>

<CompositeImage name="ButtonTxt" size="@ButtonWidth,@ButtonHeight">
    <DrawText text="@buttonText" loc="4,2" size="200,30" textStyle="ButtonText" align="Center"/>
</CompositeImage>

<CompositeImage name="NormalButton" size="@ButtonWidth,@ButtonHeight">
    <DrawImage filename="..\_res\btn.png" size="@ButtonWidth,@ButtonHeight" loc="0,0"/>
    <DrawCompositeImage name="ButtonTxt" loc="0,0" size="@ButtonWidth,@ButtonHeight"/>
</CompositeImage>

which I know does not work, but is there a way to make something like that work?
sub
Offline

Administrator

NextPVR HQ, New Zealand
Posts: 106,806
Threads: 769
Joined: Nov 2003
#8
2007-03-07, 09:09 PM
Nah, that wont work. It only looks for variable tags in a few places.
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#9
2007-03-07, 09:11 PM
sub Wrote:Nah, that wont work. It only looks for variable tags in a few places.

boo Sad I was going to ask about using math in there next
Ted the Penguin
Offline

Posting Freak

Posts: 1,590
Threads: 64
Joined: Aug 2006
#10
2007-03-07, 09:45 PM
figured I could continus asking questions about the OSD here,

is there a difference between @currentVideoTitle and @title ?

and is there ever a description for a video from the video library?
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)

Pages (2): 1 2 Next »


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

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

Linear Mode
Threaded Mode