Jump to content

Displaying backgrounds as image in skin


baddragon62

Recommended Posts

Hi Guys,

I am trying to tweak my FM14 skin to display the home town of the club on the club page. This was done in the FLUT skin for FM15 where it overwrote the backgrounds with an image pack and then displayed them in the skin

The City pack has the following config lines in the config file

<record from="5100035" to="graphics/pictures/club/5100035/background"/>

After digging about through the skin files I found the following code which displays the stadium image

<!-- stadium background etc-->

<container height="220" priority="1">

<layout class="stick_to_sides_attachment" alignment="horizontal" inset="6" layout_children="true" />

<layout class="stick_to_sides_attachment" alignment="vertical" inset="0" layout_children="true" />

<widget class="stadium_picture" id="STAp" image_alignment="top, centre_x" scale_picture="true" keep_aspect_ratio="true">

<record id="object_property">

<integer id="get_property" value="objt" />

</record>

</widget>

<widget class="picture" file="photos/overlay1" image_alignment="top, centre_x" scale_picture="true" keep_aspect_ratio="true">

<layout class="stick_to_sides_attachment" alignment="vertical" inset="3" />

</widget>

</container>

I am assuming that the class="stadium_picture" tells the code what to display therefore it should be just a matter of changing the code to say load the background image instead.

What I can't figure out is what to change it to!!!

Any advice welcome :-)

Here is how the background looks in FM15

2.png

And here is the place I want it to appear in FM14

1.png

Link to post
Share on other sites

OK Problem Solved!

The code I needed to make it work was :

<container height="220" priority="1">

<layout class="stick_to_sides_attachment" alignment="horizontal" inset="6" layout_children="true" />

<layout class="stick_to_sides_attachment" alignment="vertical" inset="0" layout_children="true" />

<widget class="background" id="bgnd" image_alignment="top, centre_x" scale_picture="true" keep_aspect_ratio="true">

<record id="object_property">

<integer id="get_property" value="bgnd" />

<integer id="set_property" value="file" />

</record>

</widget>

<widget class="picture" file="photos/overlay1" image_alignment="top, centre_x" scale_picture="true" keep_aspect_ratio="true">

<layout class="stick_to_sides_attachment" alignment="vertical" inset="3" />

</widget>

</container>

Is there a link somewhere to a detailed explanation of how a skin actually works???

Link to post
Share on other sites

Archived

This topic is now archived and is closed to further replies.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...