Labels and how they work
#1
i am screwing around with skinning a bit, and i can't figure one thing out
in the following tag:
Quote:<control>
<description>drive f: text label</description>
<type>label</type>
<id>13</id>
<posx>100</posx>
<posy>425</posy>
<label>155</label>
<font>font13</font>
<textcolor>ffb2d4f5</textcolor>
</control>
what is <label>155</label> ?
i am assuming that this is what defines the actual appearace, but where is that stored?
thanks!
Reply
#2
it's a reference to which string should be used for the text. the strings are found in the language\xxx\strings.xml file, where xxx is the local language to use. this allows localization of xbmc.

ie label number 155 refers to the string "drive" in english.
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#3
oh, ok, that makes sence
then where is the actual tag that show the remaining space of the drive?
Reply
#4
the remaining space on the drive is calculated and displayed. then label number 160 is displayed. if it can't calculate the free space, then label number 161 is displayed.

i found this out by examining the source code for this window (guiwindowsysteminfo.cpp)
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#5
ok, thanks, looks like i will have to dig in the code myself a bit

so to confirm, i can't just take the remaining hd space and display it in another window? like home.xml? or is there a way to do it (without modifying the code of cource)
Reply
#6
(webmaster_p @ april 22 2004,12:42 Wrote:ok, thanks, looks like i will have to dig in the code myself a bit

so to confirm, i can't just take the remaining hd space and display it in another window? like home.xml? or is there a way to do it (without modifying the code of cource)
ofcource you can..
just modify home.xml and add the right info there.

eg.

<control>
<description>drive f: text label</description>
<type>label</type>
<id>13</id>
<posx>100</posx>
<posy>425</posy>
<label>155</label>
<font>font13</font>
<textcolor>ffb2d4f5</textcolor>
</control>
  • ASRock ION 330 OpenELEC XBMC Frodo.
  • 47" LG HDTV1080p, AC3/DTS Receiver.
  • 96" Epson LCD 1080p projector
  • 2x Raspbery Pi with XBMC
Reply
#7
well, crap!
i was trying to that yesterday for over an hour and never got it to work
i'll give it a shot when i get home tonight

this is giving me some good ideas for a skin  Smile

thanks a lot for the help!
Reply
#8
nope, you can't.

the freespace is calculated in the code, so you'll need to transplant the code into guiwindowhome.cpp as well.

the labels will only give you the words "drive" and "free space".
Always read the XBMC online-manual, FAQ and search the forum before posting.
Do not e-mail XBMC-Team members directly asking for support. Read/follow the forum rules.
For troubleshooting and bug reporting please make sure you read this first.


Image
Reply
#9
jmarshall, thanks
i was about to attempt to do that again, so you saved me another headache
Reply
#10
to me this seems like a huge disadvantage that should be corrected. i use xbmc as my dashboard and sorely miss this information on the main page like you get with most other dashboards. i spent many hours trying to figure out how to get the information from the system info page on the home page only to be disappointed upon finding this post...it is, in the end, what has made me decide to stop working on the skin i was creating...what is the point if i can't rearrange everything i don't like?
Reply
#11
well, maybe you could just put a button on the home screen that will link to the system info page
although, i do agree, i would love to have info. especially the ip on the main screen.
Reply
#12
ya, this was the first thing i tried to do when creating my skin. this should definately be a feature request. it'd also be nice to see a little pie chart... heh, i know i'm dreaming.
Reply

Logout Mark Read Team Forum Stats Members Help
Labels and how they work0