Simple skin question

  Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Post Reply
gazhay Offline
Junior Member
Posts: 16
Joined: Aug 2010
Reputation: 0
Post: #1
I have a png inside my skin directory. (it is also in a subdirectory in my skin folder)
I want to display it.

Code:
<control type="image">
    <description>Test</description>
    <posx>5</posx>
    <posy>5</posy>
    <width>50</width>
    <height>50</height>
        <texture background="true" fallback="test.png">images/test.png</texture>
</control>

This doesn't display anything.
How do I do this? or how do I generate the full path to my file? I cannot find any documentation on the $INFO variable, and have searched the forum for over 30 minutes.[/code]
find quote
phil65 Offline
Skilled Skinner
Posts: 4,456
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #2
you have to place your image at SKINFOLDER/media/images/test.png with this image control. Remove the background and fallback attributes, they aren´t needed.
find quote
gazhay Offline
Junior Member
Posts: 16
Joined: Aug 2010
Reputation: 0
Post: #3
Eventually got it, the path is relative to the xml file.

For completeness :

Code:
../images/test.png

worked.
find quote
phil65 Offline
Skilled Skinner
Posts: 4,456
Joined: Mar 2009
Reputation: 56
Location: Cologne, Germany
Post: #4
(2012-03-31 18:26)gazhay Wrote:  Eventually got it, the path is relative to the xml file.

For completeness :

Code:
../images/test.png

worked.

no, not relative to xml file (place). it´s relative to media folder.
find quote
iDude Offline
Member
Posts: 79
Joined: Aug 2009
Reputation: 0
Post: #5
You could also use the special:// protocol for absolute paths. E.g.:

Code:
special://skin/media/images/test.png
find quote