Jump to content

[FM17] How to recolouring FM and Date buttons with original primary colour?


Jas80

Recommended Posts

Hi everyone,

I'm new on this forum.

I have a question for you: how can I recolouring FM and Date buttons with original primary colour?

At the moment the colour isn't the same of my action bar.

Can you help me?

Thanks!

fm.png

Link to post
Share on other sites

You can get the date button to use the primary colour by editing the 'current game date widget' xml file found in the panels\widgets folder for your skin.

In that file locate this line near the top of the file:

<container class="bordered_box" appearance="buttons/custom/interface/date/background">

And change it to read:

  <container class="bordered_box" appearance="buttons/custom/interface/date/background" rthr="68">
 <record id="object_property">
<list id="get_properties">
<record>
<integer id="get_property" value="tbcl" />
<integer id="set_property" value="rclr" />
</record>
</list>
</record>

For the FM button it is more complicated as the old recolouring code doesn't seem to work on it, so  you need to cheat by making it transparent and instead recolour the background behind it, to do this you need to edit the 'titlebar' xml file found in the panels/generic folder for your skin.

In that file locate this section of code near the bottom of the file:

        <container width="334">

            <layout class="arrange_horizontal_attachment" alignment="right" offset="0" gap="0"/>
            <layout class="stick_to_sides_attachment" alignment="vertical" inset="0" layout_children="true"/>

            <!-- FM button -->
            <widget class="popup_button" id="fmst" appearance="buttons/custom/interface/fm/button" icon="icons/26px/fm" width="65" disable_wheel="true">
                <event id="click_notification_event" event_id="FM" item="NULL" />
                <event id="menu_layout_notification_event" event_id="mlne" event_target="fmst" />
                <record id="items" file="menus/game" />
                <translation id="hint" translation_id="292829" type="use" value="Options[COMMENT: menubar game options button]" />
            </widget>

What you need to do is change that code to look something like this:

 <container class="plain_box" appearance="buttons/custom/interface/titlebar/paper" rthr="68" width="334">
 <record id="object_property">
<list id="get_properties">
<record>
<integer id="get_property" value="tbcl" />
<integer id="set_property" value="rclr" />
</record>
</list>
</record>

            <!-- FM button -->
            <widget class="popup_button" id="fmst" appearance="buttons/custom/interface/
date/button" icon="icons/26px/fm" width="65" disable_wheel="true">
                <event id="click_notification_event" event_id="FM" item="NULL" />
                <event id="menu_layout_notification_event" event_id="mlne" event_target="fmst" />
                <record id="items" file="menus/game" />
                <translation id="hint" translation_id="292829" type="use" value="Options[COMMENT: menubar game options button]" />
            </widget>

The first section of code will add a plain background to the top right corner of the titlebar and have it recoloured to the team background colour, however if you want the FM button to keep it's shape you will need to change the appearance bit to point to a different file which will need to be one you have created yourself in the shape you want (when colouring it colour it red).

In the middle bit of code you need to also point the FM button to a different graphic, I have picked the date button as it is transparent by default so the background will show through, if your skin has changed the date button you might need to locate a different transparent button.

Please note these instructions assume the skinner hasn't modified the titlebar, if they have you'll need to adjust the code to match the code in the file, also if you don't know how to create graphics there is a guide in the stickied skinning bible thread.

Link to post
Share on other sites

You might need to point the appearance line of the plain_box bit to a different graphic as it looks like that file might be transparent in your skin (you need to locate a solid right graphic that doesn't have any border insets declared in the corresponding xml file for the graphic).

Link to post
Share on other sites

I changed the destination of the plain_box, but it doesn't work.

Now the background colour is primary, but FM and Date disappear!

See the image below

fm.png

 

Edit:

I solved the problem.

I entered the following code after <container class="plain_box" appearance="buttons/custom/interface/titlebar/paper" rthr="68" width="334">....

<layout class="arrange_horizontal_attachment" alignment="right" offset="0" gap="0"/>
            <layout class="stick_to_sides_attachment" alignment="vertical" inset="0" layout_children="true"/>

Now it works like a charm!

But the FM text colour is white: how can I change it with secondary?

Thank you so much!

Link to post
Share on other sites

Add the following lines:

<record id="primary_icon_properties" red_replacement="secondary"/>
<record id="secondary_icon_properties" red_replacement="secondary"/>

After this bit of code:

<!-- FM button -->
<widget class="popup_button" id="fmst" appearance="buttons/custom/interface/date/button" icon="icons/26px/fm" width="65" disable_wheel="true">

 

So it should look something like this:

            <!-- FM button -->
            <widget class="popup_button" id="fmst" appearance="buttons/custom/interface/date/button" icon="icons/26px/fm" width="65" disable_wheel="true">

                <record id="primary_icon_properties" red_replacement="secondary"/>
    <record id="secondary_icon_properties" red_replacement="secondary"/>

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