PDA

View Full Version : Labels and how they work


webMASTER_P
2004-04-22, 04:18
i am screwing around with skinning a bit, and i can't figure one thing out
in the following tag:

<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!

jmarshall
2004-04-22, 04:24
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.

webMASTER_P
2004-04-22, 04:33
oh, ok, that makes sence
then where is the actual tag that show the remaining space of the drive?

jmarshall
2004-04-22, 05:51
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)

webMASTER_P
2004-04-22, 14:42
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)

Nickman
2004-04-22, 18:01
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>

webMASTER_P
2004-04-22, 18:23
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 *:)

thanks a lot for the help!

jmarshall
2004-04-23, 00:42
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".

webMASTER_P
2004-04-23, 01:00
jmarshall, thanks
i was about to attempt to do that again, so you saved me another headache

astateofblank
2004-06-24, 12:29
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?

webMASTER_P
2004-06-24, 17:42
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.

emp3r0r
2004-06-28, 21:05
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.