Patchou's Cabana

The personal blog of Patchou

MCT Documentation – How to use this?

< back to Media Center Themer’s documentation index

In order to change the appearance of the text in Media Center, you’ll need to create/edit XML configuration files for Media Center Themer. After a clean installation, you’ll find the following files in the “Media Center Themer” sub-directory of %PROGRAMDATA% which is a hidden directory in Windows by default (so the default directory is C:\ProgramData\Media Center Themer) :

  • MCTDefault.xml : the default configuration file loaded and used by Media Center Themer.
  • MCTSchema.xsd : the XML Schema that can be paired with any XML configuration file to validate their structure.

For now, forget about the schema file and concentrate on MCTDefault.xml. If you haven’t run Media Center since you installed Media Center Themer, give it a try now. By default, the configuration file contains several entries that adds some flowers in the background and transforms most of the text of Media Center to various shades of green. If green is not what you see after a fresh installation, then there may be a problem with your installation or system configuration.

Once you’ve confirmed that the software is working as intended, open the configuration file in the XML editor of your choice or, if you don’t have any, in a text editor like notepad. Two main “sections” of text should be immediately visible: one in an element called <TextFormat>, and another one in <Resources>. In the first element you’ll find several sub-elements called <Text> and <LegacyText> that specify color codes. Both define new text attributes for Media Center and should be understood in the same manner. Here’s a quick definition of how those elements are used:

  • TextFormat:
    • Text: most of the text displayed by Media Center will use attributes defined in these elements. This includes titles on the home screen and almost all the text displayed in Music, Pictures, and third-party add-ons. Text elements can be used to redefine the color of a text, its font name, font size, and even add a “bold” attribute.
    • LegacyText: some of the older parts of the software still use a different method to display text on the screen. You’ll find that to be true in most of the settings pages of Media Center. LegacyText elements can be used to redefine the color of all legacy text strings, using the same attributes-based condition system used by Text elements.
  • Resources: this is where pictures and user-interface structure data (MCML) can be replaced. More about that is explained later in the documentation, for now, let’s concentrate on colors.

The Text Elements of TextFormat

In this documentation, you’ll start learning how to theme Media Center by modifying some of its text formatting. It may look less exciting than modifying pictures and menus but it’s an important step nonetheless. Don’t worry, pages are short and you’ll learn quickly. Let’s take a look at the content of the Text elements of the TextFormat section as provided in the default MCTDefault.xml configuration file:

	<!-- Color: OffWhite -->
	<Text Color="rgb(242,242,242)">
		<Replace Color="rgb(130,240,130)"/>

	<!-- Color: LightBlue -->
	<Text Color="rgb(151,217,255)">
		<Replace Color="rgb(80,200,80)"/>

	<!-- Color: MediumBlue -->
	<Text Color="rgb(2,166,212)">
		<Replace Color="rgb(10,160,10)"/>


Three distinctive Text blocks can be seen, each one identifying a color name in its comments. These comments are for reference only and have no impact on the final result. In Media Center’s resources, OffWhite is a color defined as “242,242,242”, LightBlue is defined as “151,217,255”, etc… for each of these definitions in the configuration file, there is a matching Replace child element. It is in this element that you can define new attributes for the text to be displayed.

Here is how it works: when Media Center is loaded, the entire configuration file is loaded and analyzed by Media Center Themer. Then, each time some text needs to be drawn by Media Center, its attributes are checked against every validText element previously loaded. Each element is analyzed sequentially, from top to bottom, all its attributes are considered to be required conditions. In the example shown above, the only conditions you can see in each case are colors: in the first block, the condition is “color must be equal to rgb(242,242,242)”. If there’s a match, the new attributes defined in the Replace sub-element are applied and no other Text element is analyzed (different blocks aren’t combined). So the entire first Text element can finally be read as: “if the color of the text is equal to rgb(242,242,242), then replace it with rgb(130,240,130)”.

You can define as many Text elements as you need for your theme, just remember that only one can be used for each given text. This means that in general, complex conditions involving several attributes should be placed first, before general conditions (more about that in the next section of this documentation). For example, you could choose to apply a specific color only to text that is by default white and of a specific size (for the main menu window), or change the size of all the text that is using a specific font. Note that color must always be defined as “rgb(x,y,z)” values in the XML and all Red, Green and Blue channels need to have values between 0 and 255 inclusive. Alpha channels are not supported in the parameters, Media Center Themer will simply apply the original transparency level coming from Media Center itself, for consistency reasons.

The LegacyText Elements of TextFormat

Now let’s see what the LegacyText elements looks like:


	<!-- Legacy text (settings). Color: OffWhite -->
	<LegacyText Color="rgb(242,242,242)">
		<Replace Color="rgb(115,200,110)" />

	<!-- Legacy text (settings). Color: LightBlue -->
	<LegacyText Color="rgb(151,217,255)">
		<Replace Color="rgb(70,150,60)"/>

If you’ve understood how Text elements works, then this should be no mystery. The same kind of color condition is used for each of the two LegacyText elements and the Replace child elements are defined exactly the same way. The main difference, which you can’t see here, is the number of attributes available: when working with legacy text (again, that’s the text displayed in most of the settings windows of Media Center and some other windows such as the default music search page), only color attributes can be specified in and out. No font can be added as condition attributes or replacement attributes, as seen in the schema’s documentation. The end result of these conditions combined with the ones above from TextFormat is the complete customization of Media Center’s main colors. Try to remove one or the other and launch Media Center to see the difference.

Now that you’ve seen how both elements work, give them a try by changing the “rgb” values inside the Replace elements. All you need to do is restart Media Center to see the changes. Before continuing with the rest of this documentation, you should feel comfortable with these values and their effects in Media Center. By default, only two colors are overridden¬†by LegacyText elements, compared to three¬†by Text elements. In both cases, they shouldn’t be seen as an exhaustive list of the colors displayed by Media Center. Next stop: New Theme & Text Formatting.

  • Archive

  • Categories

  • Blogroll