NextPVR Forums
  • ______
  • Home
  • New Posts
  • Wiki
  • Members
  • Help
  • Search
  • Register
  • Login
  • Home
  • Wiki
  • Members
  • Help
  • Search
NextPVR Forums Public Developers v
« Previous 1 … 52 53 54 55 56 … 93 Next »
DrawImage element within CompositeImage

 
  • 0 Vote(s) - 0 Average
DrawImage element within CompositeImage
Brian_W
Offline

Senior Member

Posts: 419
Threads: 19
Joined: May 2006
#1
2006-08-02, 06:52 PM
Is there a way to specify a placeholder tag instead of a hardcoded filename in the DrawImage element, similar to the way you can do "@TextGoesHere" for the DrawText elements? I want to build a popup window as a Composite Image, and the window will have a jpg image contained within it, but it will not be the same jpg everytime, will depend on the selected item.

I guess I can use a SpecialElement tag to specify the location, but it would be nice to have it all within the Composite Image.

Thanks

Brian
HTPC Rig: P4 3Ghz 1GB RAM | ATI 9550 | PVR-150 | PVR-500
Software: GB-PVR 99.5
Jeff
Offline

Posting Freak

Posts: 1,933
Threads: 69
Joined: Oct 2004
#2
2006-08-02, 06:58 PM
There is. In the skin file you say something like

<DrawImage filename="@image" loc="7,7" size="60,60" />

And in your code you set the @image parameter to the jpg you want to display. Note that you pass an Image object, not a filename, despite the XML saying filename = ...

Jeff
Brian_W
Offline

Senior Member

Posts: 419
Threads: 19
Joined: May 2006
#3
2006-08-02, 06:59 PM
Ah, thats where I goofed up. I did a real quick test and passed a string, should have figured to pass an actual image object! duh. Thanks Jeff.

Brian
HTPC Rig: P4 3Ghz 1GB RAM | ATI 9550 | PVR-150 | PVR-500
Software: GB-PVR 99.5
Fatman_do
Offline

Posting Freak

Posts: 3,482
Threads: 95
Joined: Nov 2005
#4
2006-08-02, 07:05 PM
Brian_W Wrote:Is there a way to specify a placeholder tag instead of a hardcoded filename in the DrawImage element, similar to the way you can do "@TextGoesHere" for the DrawText elements? I want to build a popup window as a Composite Image, and the window will have a jpg image contained within it, but it will not be the same jpg everytime, will depend on the selected item.

I guess I can use a SpecialElement tag to specify the location, but it would be nice to have it all within the Composite Image.

Thanks

Brian

How it is done within the plugin is something I cannot answer. How it is done in a skin.xml file is like this:
Code:
<CompositeImage name="Popup" size="514,210">
    <DrawImage size="xx,yy" loc="x,y" filename="@WhateverYourTagIs" />
    <DrawText size="xxx,yy" loc="xx,y" text="@WhateverTextTag1" align="Left" textStyle="GeneralText" />
    <DrawText size="xxx,yy" loc="xxx,yy" text="WhateverTextTag2" align="Left" textStyle="GeneralText" />
</CompositeImage>

And buttons within could be controlled by a special element like

Code:
<SpecialElement name="PopupBox" size="xxx,yyy" loc="xxx,yyy" />
<SpecialElement name="PopupReviewButton" size="xxx,yy" loc="xxx,yyy" />
<SpecialElement name="PopupExitButton" size="xxx,yy" loc="xxx,yyy" />

and the buttons are driven by these composite images

Code:
<!-- image used for a popup selected button -->
<CompositeImage name="PopupSelectedButtonImage" size="130,38">
    <DrawRoundedRect loc="4,5" size="120,30" radius="10" borderWidth="4" borderColor="White" fillColor="DarkBlue"/>            
    <DrawText text="@buttonText" loc="0,9" size="130,34" textStyle="ButtonText" align="Center"/>            
</CompositeImage>
        
<!-- image used for a popup normal button -->
<CompositeImage name="PopupNormalButtonImage" size="130,38">            
    <DrawRoundedRect loc="4,5" size="120,30" radius="10" borderWidth="4" borderColor="Black" fillColor="DarkBlue"/>            
    <DrawText text="@buttonText" loc="0,9" size="130,34" textStyle="ButtonText" align="Center"/>            
</CompositeImage>

That is how it would possibly be done on the skinning side of things.
(I used some of Jeff's code as an example with the names and values changed Wink)
Fatman_do
[SIZE="1"]
HTPC: AMD XP+2500, 512MB DDR (400) ~ Capture Device: Hauppage PVR-150
Storage: 30GB OS & Recording, 160GB Post Processing & Archive
Video Output: HD 32" TV via eVGA Geforce 6200le 256MB AGP DVI-HDMI cable out
Audio Output: Turtle Beach Riviera S/PDIF Optic Output (Digital pass thru only) to Home Theater Receiver[/SIZE]

[SIZE="2"]
Moderator | Tutorials | Community Skin | CommunitySkin-SVN[/SIZE]
« Next Oldest | Next Newest »

Users browsing this thread: 1 Guest(s)



Possibly Related Threads…
Thread Author Replies Views Last Post
  Possible to have another element in details-single.xml Northpole 2 2,225 2014-07-11, 09:51 PM
Last Post: Northpole
  GetRenderList() always called with "block-extras..." element in renderlist alibert 1 1,638 2012-06-18, 10:24 AM
Last Post: sub
  Element explanations? PatM 12 3,858 2012-03-12, 10:16 PM
Last Post: PatM
  Skin element Details in NowNext Jaggy 2 1,795 2011-09-19, 11:50 PM
Last Post: Jaggy
  Add another element to the horizontal main menu Northpole 7 2,887 2011-08-25, 06:18 PM
Last Post: imilne
  Actual size of inner element in NPVR scb147 2 1,771 2010-11-02, 06:40 PM
Last Post: scb147
  TV Guide Element Render order Northpole 0 1,294 2010-10-24, 04:11 PM
Last Post: Northpole
  "Natural" size of a CompositeImage? PartialGestalt 2 1,907 2008-10-24, 03:30 PM
Last Post: PartialGestalt
  How do you use skinHelper.getNamedImageElementPos(name,element) ?? JavaWiz 6 2,294 2007-05-19, 08:28 AM
Last Post: McBainUK
  Understanding CompositeImage bgowland 5 2,314 2006-05-19, 07:27 PM
Last Post: bgowland

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

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

Linear Mode
Threaded Mode