Drive Free Space Plugin (1 Viewer)

daniel_1980

Portal Pro
August 19, 2006
148
1
Home Country
Germany Germany
Hi,

thanks a lot to rambo!

This code did it for me:

<control>
<description>Drive space</description>
<type>label</type>
<textalign>center</textalign>
<textcolor>ffffffff</textcolor>
<id>37483</id>
<posX>147</posX>
<posY>680</posY>
<width>160</width>
<height>300</height>
<font>font12</font>
<label>#Drives(T).AvailableSpace.Data</label>
<visible>yes</visible>
</control>



Perhaps it might be helpful for somebody to add that the code must be inserted above the lines

</controls>
</window>


Next question:
Is it possible to do some math with the free space values, like calculating the available time for recordings, when assuming a typical bitrate?
E.g. typical bitrate 4kiBit/s, available space 12,3GiB => available time 25190s = 6h 59min => 6:59h is displayed
 

joz

Portal Pro
March 17, 2008
1,353
306
Home Country
Netherlands Netherlands
Sure it is possible but ofcourse not thru the skinengine since that's all about presentation, not calculation.
So you'd have to write a (process) plugin
 

quake2rambo

MP Donator
  • Premium Supporter
  • January 18, 2007
    803
    47
    Home Country
    Germany Germany
    Hi.
    I changed my code in mytvguide.xml again, because there was a collision with the tv-preview:rolleyes:. Now it's better ...

    <control>
    <description>Drive space</description>
    <type>label</type>
    <textalign>center</textalign>
    <textcolor>ffffffff</textcolor>
    <id>37483</id>
    <posX>35</posX>
    <posY>520</posY>
    <width>160</width>
    <height>300</height>
    <font>font9</font>
    <label>#Drives(V).AvailableSpace.Data</label>
    <visible>yes</visible>
    </control>

    <control>
    <description>Progress Bar</description>
    <type>progress</type>
    <id>20</id>
    <posX>130</posX>
    <posY>520</posY>
    <width>200</width>
    <height>30</height>
    <label>#Drives(V).AvailableSpace.UsedPercentage</label>
    <texturebg>progress_background_tvhome.png</texturebg>
    <lefttexture>progress_blank30.png</lefttexture>
    <midtexture>progress_mid_white30.png</midtexture>
    <righttexture>progress_blank30.png</righttexture>
    <visible>yes</visible>
    </control>

    Hope this helps anway ...
     

    Attachments

    • drivespaceplugin_fail.jpg
      drivespaceplugin_fail.jpg
      226.1 KB
    • drivespaceplugin_new.jpg
      drivespaceplugin_new.jpg
      226.1 KB

    Peter2

    MP Donator
  • Premium Supporter
  • September 18, 2006
    848
    53
    Home Country
    Belgium Belgium
    progress bar images

    Hi guys, let me first say that this is a WONDERFUL plug in: THANK YOU SilentExcept!!!:D
    I'm using Blue3 as skin and the text is ok but now I'm trying to add the progress bars.
    I have these files:
    osd_progress_background.png
    osd_progress_indicator.png
    osd_progress_left.png
    osd_progress_mid.png
    osd_progress_mid_orange.png
    osd_progress_mid_red.png
    osd_progress_right.png
    progress_back.png
    progress_bg.png
    progress_mid.png​

    I don't have a clue how to integrate this into the xml file to display 1 bar with 2 different colors (used/free).
    Am I right that I have to change the height/width anyway?
    This is what I have now:
    Code:
      <posX>320</posX>
      <posY>55</posY>
      <width>100</width>
      <height>20</height>
      <label>#Drives(D).AvailableSpace.Data</label>
      <texturebg>progress_bg.png</texturebg>
      <lefttexture>progress_blank30.png</lefttexture>
      <midtexture>progress_mid.png</midtexture>
      <righttexture>progress_blank30.png</righttexture>

    A helping hand is very much appreciated.
    P2
     

    quake2rambo

    MP Donator
  • Premium Supporter
  • January 18, 2007
    803
    47
    Home Country
    Germany Germany
    Hi,
    height/width means how thick/long the displayed status is.
    and
    <posX>320</posX>
    <posY>55</posY>
    means the position (counted in pixel). The count begins in the upper left corner of your display.
    That's all ...
     

    Peter2

    MP Donator
  • Premium Supporter
  • September 18, 2006
    848
    53
    Home Country
    Belgium Belgium
    Hi quake2rambo, thank you for your reply.
    I had already figured out the positioning but what about which files to use to really get a progress bar, being 1 bar with different colors.
    From what I can make out of it, there is only 1 bar defined, what about the other one & which image files should I use?
     

    quake2rambo

    MP Donator
  • Premium Supporter
  • January 18, 2007
    803
    47
    Home Country
    Germany Germany
    I think there it is not possible to get a warning by color changes. You can define the background and the progress via image files with ONE color. And what color you want to use, it is on you.
     

    SilentException

    Retired Team Member
  • Premium Supporter
  • October 27, 2008
    2,617
    1,130
    Rijeka, Croatia
    Home Country
    Croatia Croatia
    • Thread starter
    • Moderator
    • #69
    there are lefttexture, midtexture and righttexture tags in the progress control. maybe you can do something with that Peter2?

    edit: oh nevermind.. i just saw you did that.. there is no way to show it the way you'd like..

    maybe you can do some red->green gradient for progress bar?
     

    Peter2

    MP Donator
  • Premium Supporter
  • September 18, 2006
    848
    53
    Home Country
    Belgium Belgium

    Users who are viewing this thread

    Top Bottom