Jump to content

Text colour in buttons


yonko1

Recommended Posts

http://img843.imageshack.us/img843/8562/sergioaguero.jpg

I've been trying unsuccessfully to change the text colour in the buttons circled in red in the above screenshot. Can anyone help me changed them to white? So far I've been playing around in the graphics folders with the button.xml's but only these buttons "refuse" to change the text colour to white. After some thinking I assume it might require some editing in the tabs.xml - am I correct in assuming so? If yes, what code I need to add? Here is what is in there:

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

<!DOCTYPE panel SYSTEM "http://www.sigames.com/dtds/sios/panel.dtd">

<panel title="tabs" translate="false">

<!-- ask the children to stick to the top, left corner -->

<layout class="stick_to_sides_attachment" alignment="top,horizontal" layout_children="true" inset="0"/>

<!--stick to the centre -->

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

<!-- stick to the left -->

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

<!-- fit to the children vertically -->

<layout class="fit_children_attachment" alignment="vertical" offset="0"/>

<!-- Tabs Background -->

<widget class="picture" id="pict" file="interface/menubar/bar_bg" height="59">

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

<layout class="stick_to_sides_attachment" alignment="horizontal" inset="-10"/>

</widget>

<!-- Sub-tabs Background -->

<widget class="picture" id="pict" file="interface/actions/bar" height="59">

<layout class="stick_to_sides_attachment" alignment="top" inset="29"/>

<layout class="stick_to_sides_attachment" alignment="horizontal" inset="-10"/>

</widget>

<!-- Tabs -->

<widget class="tab_strip" id="tree" auto_size="all" top_strip_inset="165" sub_strip_appearance="button/sub tabs" size="7">

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

<attachment class="get_global_attachment" get_property="subo" set_property="itms" skip_if_null="false"/>

<attachment class="get_global_attachment" get_property="ssub" set_property="slct" skip_if_null="true"/>

<attachment class="get_global_attachment" get_property="ngtb" set_property="ngtb" skip_if_null="true"/>

<attachment class="get_channelled_event_property_attachment" event_id="SSch" get_property="ssub" set_property="slct" skip_if_null="true"/>

<record id="sele" event_id="LINK" event_target="scrn"/>

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

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

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

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

</widget>

<container>

<layout class="arrange_horizontal_attachment" alignment="left" offset="4"/>

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

<layout class="fit_children_attachment" alignment="vertical" offset="0"/>

<layout class="stick_to_sides_attachment" alignment="top" inset="4" />

<!-- Back Button -->

<widget class="action_button" id="back" text="[COMMENT: title bar; back and forward buttons; navigate back action]" width="20" appearance="button/custom/back/back" style="semi_bold,embossed" alignment="centre" size="7">

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

<attachment class="get_global_attachment" get_property="disp" set_property="disa"/>

<record id="click_event" event_id="GOTO" event_target="scrn" scin="-3"/>

</widget>

<widget class="icon_button" text="Continue" id="GCNT" width="100" size="10" appearance="button/blue/button" colour="white" style="semi_bold, embossed" alignment="centre" icon="">

<record id="click_event" event_id="CONT" event_target="scrn"/>

<attachment class="test_global_attachment" get_property="cont" set_property="disa">

<list id="value">

<integer value="-8"/>

<integer value="-5"/>

</list>

</attachment>

<attachment class="test_global_attachment" get_property="cont" set_property="hidn">

<list id="value">

<integer value="-14"/>

</list>

</attachment>

<!-- match play text -->

<attachment class="get_global_attachment" get_property="cttx" set_property="text"/>

</widget>

<!-- Must do stuff Button -->

<widget class="icon_button" text="Must Respond[COMMENT: text to indicate that there is a news item the user must respond to before continuing the game]" id="MDSB" width="100" size="9" appearance="button/custom/continue/button" colour="continue button text" style="semi_bold, embossed" alignment="centre" icon="icons/news/response">

<record id="click_event" event_id="CONT" event_target="scrn"/>

<attachment class="test_global_attachment" mode="1" get_property="cont" set_property="hidn">

<list id="value">

<integer value="-14"/>

</list>

</attachment>

</widget>

<!-- Next Button -->

<widget class="action_button" id="forw" text="[COMMENT: title bar; back and forward buttons; navigate forward action]" width="20" appearance="button/custom/forward/forward" style="semi_bold,embossed" alignment="centre" size="7">

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

<attachment class="get_global_attachment" get_property="disn" set_property="disa"/>

<record id="click_event" event_id="GOTO" event_target="scrn" scin="-2"/>

</widget>

</container>

<container>

<layout class="arrange_horizontal_attachment" alignment="right" offset="4"/>

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

<layout class="fit_children_attachment" alignment="vertical" offset="0"/>

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

<!-- Search -->

<container id="msbo">

<layout class="centre_in_parent_attachment" alignment="all" inset="0" layout_children="true" priority="1" />

<layout class="fit_children_attachment" alignment="all" offset="0"/>

<widget id="find" class="edit_box" appearance="interface/searchbox/box" spec="text,small" width="100" colour="continue button text">

<attachment kind="max_length_attachment" length="150" />

<!-- sent the return/enter key event to the screen: it causes a quick search to be performed -->

<event id="return_event">

<flags id="event_id" value="DBSR"/>

<flags id="event_target" value="scrn"/>

</event>

<!-- sent the edit event to the screen: will store the search text to set in the next screen (could be the match title bar) -->

<event id="edit_event">

<flags id="event_id" value="DBSC"/>

<flags id="event_target" value="scrn"/>

</event>

<!-- send the text changed event to the clear button: if the text is empty, the clear button is disabled or removed -->

<event id="changed_event">

<flags id="event_id" value="chtx" />

<flags id="event_target" value="finb" />

</event>

<!-- check the global property that specifies if the game is set up or loaded (ie if we can do a quick search) -->

<attachment class="test_global_attachment" get_property="gset" value="false" set_property="disa"/>

<attachment class="get_global_attachment" get_property="qset" set_property="text"/>

</widget>

<!-- search button -->

<widget class="action_button" id="srch" text="" appearance="icons/quick links/search/button" auto_size="all" >

<layout class="stick_to_sides_attachment" alignment="left" inset="2"/>

<!--for the click event, we send a return to the edit box-->

<event id="click_event">

<flags id="event_id" value="keyp"/>

<flags id="event_target" value="find"/>

<!--5 is KEY_RETURN - see keyboard_flags.h-->

<flags id="code" value="5"/>

</event>

</widget>

<!-- Button to clear the contents of the searchbox -->

<widget class="action_button" id="finb" auto_size="all" appearance="interface/searchbox/clear/button" hidden="true">

<layout class="stick_to_sides_attachment" alignment="right" inset="4"/>

<!-- click event sends the deletion/clear event to the find edit box -->

<event id="click_event">

<flags id="event_id" value="DELE"/>

<flags id="event_target" value="find"/>

</event>

<!-- check for the 'gset' property, which indicates if the game is loaded or set up -->

<attachment class="test_global_attachment" get_property="gset" value="false" set_property="disa"/>

<!-- check for the change text (chtx) event that edit box will send us when: we check the 'text is empty' property of the event and set the disabled property to the value of 'chtx' -->

<attachment class="test_event_attachment" event_id="chtx" get_property="txie" set_property="hidn" mode="1" />

</widget>

</container>

</container>

<!-- Actions -->

<container id="acts">

<layout class="arrange_horizontal_attachment" alignment="right" offset="3"/>

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

<layout class="fit_children_attachment" alignment="vertical" offset="0"/>

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

<attachment class="test_global_attachment" get_property="MAHd" value="true" mode="0" set_property="hidn" skip_if_null="false" skip_if_resetting="false"/>

<attachment class="line_up_attachment" get_property="acts" default_widget_type="action_button_action" submenu_type="popup_button_actions">

<!-- the sub menus should have a fixed text label -->

<record id="submenu_properties" fixed="true"/>

</attachment>

</container>

<!-- Actions -->

<container>

<layout class="stick_to_sides_attachment" alignment="right, bottom" layout_children="false" inset="4"/>

<layout class="fit_children_attachment" alignment="vertical" offset="0"/>

<widget class="match_controls_panel" id="mctp" hidden="true" width="450" height="24" is_in_modal_menu="false">

<layout class="stick_to_sides_attachment" alignment="right" inset="11"/>

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

<layout class="fit_children_attachment" alignment="horizontal, fill" gap="4"/>

<attachment class="test_global_attachment" get_property="MAHd" value="true" mode="1" set_property="hidn" skip_if_null="false" skip_if_resetting="false"/>

</widget>

</container>

<!-- hide this panel in "navigation disabled" mode -->

<attachment class="test_global_attachment" get_property="FS " value="true" set_property="hidn" />

</panel>

Thanks in advance!

Link to post
Share on other sites

Try extracting the contents of the classes.fmf file and copy this file 'action_button_action.xml' to the classes folder for your skin (you might need to create the classes folder).

Then in the xml file add this line among the other lines:

<flags id="colour" value="white"/>

And that should hopefully change the text colour.

If that change doesn't also affect the Match Controls you should just need to add colour="white" code to this code:

<widget class="match_controls_panel" id="mctp" hidden="true" width="450" height="24" is_in_modal_menu="false">

So change it to:

<widget class="match_controls_panel" id="mctp" hidden="true" width="450" height="24"
colour="white"
is_in_modal_menu="false">

Link to post
Share on other sites

Thanks, I will try and see what happens. FYI, the text in the match control button is white: http://img210.imageshack.us/img210/3441/matchcontrols.jpg

Here is a couple of more examples where it isn't:

squad: http://img62.imageshack.us/img62/7916/squadscreen.jpg

home: http://img826.imageshack.us/img826/183/homescreenr.jpg

In addition how do I make the title text in these boxes black on the home screen?

Thanks again!

Link to post
Share on other sites

To change the text colour on the home screen locate this xml file in the panels folder: manager home.xml

At the bottom of the file where it lists the titles of all the cusom panels try adding the colour="black" code after the title="X" code and that should hopefully change the colours, otherwise it will be one of the colour options in the settings file. (and you'd need to use trial and error to find the right colour).

Link to post
Share on other sites

michealtmurrayuk, I appreciate you trying to help, but I've had no luck with the suggested changes. Using the xml file from classes folder only managed to move the buttons slightly to the left - strange as to why?! And the title text in home screen custom screens stayed unchanged. Here, have a look:

http://img251.imageshack.us/img251/645/aguero2.jpg

http://img844.imageshack.us/img844/4341/home2z.jpg

Do you have any other suggestions? The white "squad" text in the action button (in the Aguero screenshot) shows up only when I click the button, fyi. In the graphics folder I have xml file for button, button_showing and button_clicked all with this code added in:

<!-- text colour

<colour id="colr" name="white"/> -->

BTW, I'm a little unsure are these buttons in the graphics/button/action folder or in the graphics/menu/actions folder?

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