Jump to content

Sidebar Colour, anyway to make it change for every team..


Barkermush

Recommended Posts

Is there anyway to make the sidebar change colour on every squad screen, not just the user controlled?

Like the old days, where it would change to the teams colour whenever you clicked on another team.

So say if I clicked on another team, say Chelsea, the sidebar would change blue etc. Is there anyway to code this into FM15?

Link to post
Share on other sites

Not sure, you can try adding the following code to the client object browser.xml file:

<record id="object_property">

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

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

</record>

That is the code that recolours items, try adding it after this bit of code:

<widget class="sidebar_menu_table" id="side" width="160">

If that doesn't work then it likely isn't possible.

Link to post
Share on other sites

Not sure, you can try adding the following code to the client object browser.xml file:

<record id="object_property">

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

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

</record>

That is the code that recolours items, try adding it after this bit of code:

<widget class="sidebar_menu_table" id="side" width="160">

If that doesn't work then it likely isn't possible.

Nope, doesn't seem to work.

That's a shame, thanks anyway.

Link to post
Share on other sites

It is possible, I'm not at my PC right now though but I'll outline how to do it shortly, requires adding a picture widget which includes Michaels code to side menu table.xml

Been messing around myself while waiting, but to no avail.

Which picture widget do I need to add?

Link to post
Share on other sites

You should be able to modify the sidebar mods by ArtDekDok - the third one has a dortmund overlay image added to the sidebar if you replace that with a plain red image (You might need to make it a dark red image so the icons/text is still readable on light teams, as I don't think it's possible to get it to automatically switch if it fails the contrast check like the default one does) and then add the colour changing code from above to the code that calls that image it should hopefully recolour the sidebar.

Link to post
Share on other sites

Got it working, looks great.

30cwvnn.jpghu1un6.jpg2a8m8lc.jpgruo4yx.jpg

How did you manage to pull that off wkdsoul? I tried the above mentioned instructions, but it didnt help. My sidebar just stayed red without changing color, even though i pasted the code into client object browser?

Link to post
Share on other sites

I actually did mine a little differently and put this in the sidebar menu table

You will have to point the picture to your own file in yours though

<!-- sidebar background -->

<widget class="picture" id="colb" file="boxes/custom/interface/titlebar/paper" rthr="68" >

<!-- set the colour of the image to the team background colour -->

<record id="object_property">

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

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

</record>

</widget>

Goes below this in your panel

<?xml version="1.0" encoding="UTF-8"?>

<panel>

<integer id="width_threshold" value="1164"/>

<integer id="width_with_labels" value="180"/>

<integer id="width_without_labels" value="50"/>

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

Link to post
Share on other sites

  • 1 year later...
I actually did mine a little differently and put this in the sidebar menu table

You will have to point the picture to your own file in yours though

<!-- sidebar background -->

<widget class="picture" id="colb" file="boxes/custom/interface/titlebar/paper" rthr="68" >

<!-- set the colour of the image to the team background colour -->

<record id="object_property">

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

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

</record>

</widget>

Goes below this in your panel

<?xml version="1.0" encoding="UTF-8"?>

<panel>

<integer id="width_threshold" value="1164"/>

<integer id="width_with_labels" value="180"/>

<integer id="width_without_labels" value="50"/>

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

I have followed these instructions and edited the Sidebar Menu Table xml and it does seem to work which is good news.

The issue I have is that when I click on a team that play in white, in my case Borussia Monchengladbach, the text is hard to see. I am wanting the sidebar colours to take the titlebar colour and the team colour so in this case the sidebar would be white and the text would be black. I have included a pic below of the issue.

https://www.flickr.com/photos/126414424@N02/24578912410/sizes/l

Also the silight issue that I have is that the shade of colour isn't quite right. As you can see here with the titlebar, the sidebar should be a darker shade of red.

https://www.flickr.com/photos/126414424@N02/24780996981/sizes/l

Is there a way of getting the sidebar to show the colour of the team correctly?

Thanks

Link to post
Share on other sites

Theres no way of changing the colour of the text in the sidebar, its one of those things si left uneditable if i remember rightly (in their wisdom). Easiest thing to do would be to open the image in photoshop and make it like 50% transparent so the text stands out more.

Link to post
Share on other sites

Well the biggest issue besides the white text is that the colour on the sidebar seem to be slightly brighter than the team colour in the titlebar. If I could match the colour of the sidebar to the shade of colour that appears in the titlebar then that would be good

Link to post
Share on other sites

In the xml file try replacing this code:

<!-- sidebar background -->

<widget class="picture" id="colb" file="boxes/custom/interface/titlebar/paper" rthr="68" >

<!-- set the colour of the image to the team background colour -->

<record id="object_property">

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

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

</record>

</widget>

With this code:

<!-- sidebar background -->

<widget class="picture" id="colb" file="boxes/custom/interface/titlebar/paper" red_replacement="primary" />

That should then get the game to recolour the sidebar using the new contrast recolouring code.

The text colours should be controlled by this line in the same file (there are three lines one for club, nations and unemployed):

<record id="column_properties" alignment="left,centre_y" colour="match text" size="10.1"/>

Changing the colour value should recolour the text, if you use "secondary", "accent" or "dark accent" then it should recolour to the teams text colour like in the titlebar, or if you want to keep the white text then you could change the primary code above to "accent" or "dark accent" (one is for light content the other for dark but cannot remember off the top of my head which is which) and that should ensure the game only picks dark colours for the sidebar.

Link to post
Share on other sites

  • 1 month later...

I have one last slight annoying issue with the sidebar. I have included the team logo at the bottom of the sidebar which works fine for every team except Nottingham Forest. For some reason their logo is displayed bigger and goes into the text of the sidebar. I have included a screenshot to show what this is like.

https://www.flickr.com/photos/126414424@N02/25021078624/sizes/l

Is there anyway to show the logo for Nottingham Forest to be the same size as the rest of the logos that are displayed on the sidebar?

Link to post
Share on other sites

I have checked the sidebar menu xml file and it has both the scale_picture="true" and keep_aspect_ratio="true" set. The png logo is the same size as the rest of the logos too so I'm not too sure what the issue is really. It is just strange that it only happens with Nottingham Forest

Link to post
Share on other sites

I have also tried it with another skin that uses logos on the sidebar and it is exactly the same with Nottingham Forest. Not sure if it is more to do with the image file as opposed to the skin, but the logo is the same size as the rest of the logos. In fact I have been using the FM09 standard logos action file for photoshop to create the logo so I am confident that the logo is the correct size

Link to post
Share on other sites

So I tried the height="XX" in the sidebar menu table xml and that didnt do anything. So then I thought I would remove the image from the graphics folder that I used. That just put the default standard logo in that is used for unlicensed teams. My next step was to extract the graphics folder using the Resource Archiver and put the forest logo into my graphics folder from the game. Unfortunatley that didn't work either and this was the result.

25554190902_aa88880534_b.jpg

Link to post
Share on other sites

Depending on how the skinner has done it you may need to put the logo code inside its own container and adjust the layout code, if the code is based on arts sidebar mods from last year something like this should work:

<container>

<layout class="arrange_vertical_attachment" alignment="bottom" gap="0" offset="5"/>

<layout class="stick_to_sides_attachment" alignment="bottom" inset="0" />

<!-- Club Logo -->

<widget class="picture" id="pict" width="160" height="160" scale_picture="true" >

<boolean id="keep_aspect_ratio" value="true" />

<flags id="image_alignment" value="bottom" />

<record id="object_property">

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

</record>

</widget>

</container>

And then adjust the height, width and offset values to fit in with the space you have available.

Link to post
Share on other sites

I tried to put that code into my sidebar menu xml file and it cam up with an error. So i tried to put just the width and height fields into the logo section and it still didnt work. So i have reverted my sidebar menu xml file to how it was. Here is what my xml file contains, maybe you can spot something that could be edited.

<?xml version="1.0" encoding="UTF-8"?>

<panel>

<integer id="width_threshold" value="1164"/>

<integer id="width_with_labels" value="180"/>

<integer id="width_without_labels" value="50"/>

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

<!-- sidebar background -->

<widget class="picture" id="colb" file="boxes/custom/interface/titlebar/paper" red_replacement="primary" />

<container class="vertical_adaptive_container" inset="0" offset="0" gap="0">

<!--sidebar-->

<container default_height="-1">

<layout class="arranger_vertical_attachment" alignment="top, fill" offset="0" gap="0"/>

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

<widget class="battery_power_indicator" width="0" height="0"/>

<widget class="picture" file="dividers/standard/horizontal/line" width="2" />

<!-- Primary Logo -->

<widget class="picture" id="lgtF" scale_picture="true" keep_aspect_ratio="true" image_alignment="bottom">

<layout class="stick_to_sides_attachment" alignment="bottom" inset="5"/>

<attachment class="test_setting_attachment" get_setting="show_badges" default_value="true" set_property="hidn">

<boolean id="value" value="false"/>

</attachment>

<!-- tells the picture to listen to the 'main picture' global property being set, and set its own file property from it -->

<record id="object_property">

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

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

</record>

</widget>

<!--club/nation selector-->

<container class="tabbed_container" id="tabc" changed_event="Tesc" contents_kind="container" group_kind="container" hide_selector_if_one_or_fewer_items="true">

<record id="top_properties">

<flags id="appearance" value="tabs/custom/sidebar"/>

<flags id="auto_size" value="vertical" />

<flags id="alignment" value="top" />

<boolean id="use_alt_end_tab_appearances" value="false"/>

</record>

<record id="help" help_translation_id="uiSi" alignment="right, centre_y"/>

<!--club table-->

<widget class="table" id="club" mode="select_rows,fill_rows,hide_headings,dont_allow_click_unselect_single" auto_size_rows="true" fixed_size_rows="false">

<list id="column_display_properties">

<record width="-1" column_heading="Icon">

<record id="column_properties"/>

</record>

<record width="-3" minimum_width="100" column_heading="Name">

<record id="column_properties" alignment="left,centre_y" colour="secondary" size="10.1"/>

</record>

</list>

</widget>

<!--nation table-->

<widget class="table" id="nati" mode="select_rows,fill_rows,hide_headings,dont_allow_click_unselect_single" auto_size_rows="true" fixed_size_rows="false">

<list id="column_display_properties">

<record width="-1" column_heading="Icon">

<record id="column_properties"/>

</record>

<record width="-3" minimum_width="100" column_heading="Name">

<record id="column_properties" alignment="left,centre_y" colour="secondary" size="10.1"/>

</record>

</list>

</widget>

</container>

<!--unemployed table-->

<widget class="table" id="unem" mode="select_rows,fill_rows,hide_headings,dont_allow_click_unselect_single" auto_size_rows="true" fixed_size_rows="false">

<list id="column_display_properties">

<record width="-1" column_heading="Icon">

<record id="column_properties"/>

</record>

<record width="-3" minimum_width="100" column_heading="Name">

<record id="column_properties" alignment="left,centre_y" colour="secondary" size="10.1"/>

</record>

</list>

</widget>

</container>

</container>

</panel>

Link to post
Share on other sites

Try removing this code:

<!-- Primary Logo -->

<widget class="picture" id="lgtF" scale_picture="true" keep_aspect_ratio="true" image_alignment="bottom">

<layout class="stick_to_sides_attachment" alignment="bottom" inset="5"/>

<attachment class="test_setting_attachment" get_setting="show_badges" default_value="true" set_property="hidn">

<boolean id="value" value="false"/>

</attachment>

<!-- tells the picture to listen to the 'main picture' global property being set, and set its own file property from it -->

<record id="object_property">

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

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

</record>

</widget>

And then add my code from the previous post after these lines near the top:

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

<!-- sidebar background -->

<widget class="picture" id="colb" file="boxes/custom/interface/titlebar/paper" red_replacement="primary" />

Link to post
Share on other sites

  • 1 month later...

Everything just confused me. Read whole page few times, but this is too much for noob like me. :( Can someone tell me which post to follow? What should I do to get colored sidebar in team colors?

Link to post
Share on other sites

Everything just confused me. Read whole page few times, but this is too much for noob like me. :( Can someone tell me which post to follow? What should I do to get colored sidebar in team colors?

Post 23.

Link to post
Share on other sites

<layout class="stick_to_sides_attachment" alignment="bottom" inset="0" />

have a look for the horizontal code near the image widget, it will be something similar to the about you can change the inset number or change the alignment to centre or all.

Link to post
Share on other sites

<layout class="stick_to_sides_attachment" alignment="bottom" inset="0" />

have a look for the horizontal code near the image widget, it will be something similar to the about you can change the inset number or change the alignment to centre or all.

<container>

<layout class="arrange_vertical_attachment" alignment="bottom" gap="0" offset="5"/>

<layout class="stick_to_sides_attachment" alignment="bottom" inset="0" />

<!-- Club Logo -->

<widget class="picture" id="pict" width="130" height="130" scale_picture="true">

<boolean id="keep_aspect_ratio" value="true" />

<flags id="image_alignment" value="bottom"/>

<record id="object_property">

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

</record>

</widget>

</container>

This is the part of sidebar menu table.xml in question... Nothing similar to horizontal code :(

Link to post
Share on other sites

<layout class="stick_to_sides_attachment" alignment="bottom" inset="0" />

that line is the exact one i jsut posted, 3rd down.

I've done inset="200" for example but is sticked to left and goes up in vertical.. :D

Sorry, but i'm noob of this

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