Patchou's Cabana

The personal blog of Patchou

MCT Documentation – Samples

< back to Media Center Themer’s documentation index

All the samples in this page are complete theme files. Just copy past one of these code sections in your XML file (by default, MCTDefault.xml) to give it a try.

Sample 1

Here, you’ll find various XML configuration files demonstrating different kinds of conditions and replacement attributes. The results in Media Center is not necessarily pretty but it may help you get more understanding of how attributes are defined in TextFormat.

<MediaCenterThemer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MCTSchema.xsd">
	<!-- Sample file demonstrating different kinds of conditions/replacement values -->
	<TextFormat>

		<!-- Change all text originally displayed in white to pink and change the font to Courier New -->
		<Text Color="rgb(242,242,242)">
			<Replace Color="rgb(230,100,100)" Font="Courier New"/>
		</Text>

		<!-- Change all text displayed in blue with Segoe Media Center to Comic Sans MS, bold -->
		<Text Color="rgb(151,217,255)" Font="Segoe Media Center">
			<Replace Font="Comic Sans MS" Bold="true" />
		</Text>
		<Text Color="rgb(2,166,212)" Font="Segoe Media Center">
			<Replace Font="Comic Sans MS" Bold="true" />
		</Text>
		<Text Color="rgb(5,33,92)" Font="Segoe Media Center">
			<Replace Font="Comic Sans MS" Bold="true" />
		</Text>

		<!-- Change all text displayed in Segoe Media Center Light to yellow and a smaller font size -->
		<Text Font="Segoe Media Center Light">
			<Replace Color="rgb(255,255,90)" Height="20" />
		</Text>

	</TextFormat>
</MediaCenterThemer>

Sample 2

The following file is an example of how to change the colors of Media Center when it’s run in an Extender (tested with an Xbox 360). The procedure stays the same: Media Center is started from the extender and the log is checked to see what colors are in use. One particularity of the extenders is the absence of alpha blending effects in the text. This means for example that on the home screen, two colors are used instead of one (normally, Media Center displays the text in white and then applies transparency for all the items that are not selected). Here is the result:

<MediaCenterThemer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MCTSchema.xsd">
	<!-- Sample file to replace the text color of the home screen in an Xbox Extender -->
	<TextFormat>

		<!-- Color of the text menu item when selected -->
		<Text Color="rgb(210,210,210)">
			<Replace Color="rgb(130,240,130)"/>
		</Text>

		<!-- Color of all the other non-selected items in the home screen -->
		<Text Color="rgb(104,185,200)">
			<Replace Color="rgb(205,240,205)"/>
		</Text>

	</TextFormat>
</MediaCenterThemer>

Sample 3

Here’s an example of an XML file that shows how to colorize the interface in green, modifying more than 300 pictures in one shot. The static background is modified using a custom picture.

<MediaCenterThemer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MCTSchema.xsd">
	<!-- Sample file to change the color of all the blue pictures in Media Center -->
	<Resources>
		<Rcdata Colorize="rgb(0,180,0)">

			<!-- The default non-animated background is replaced by a different picture -->
			<Resource Id="COMMON.BACKGROUND.PNG">
				<Replace File="Theme\custom-pic.jpg"/>
			</Resource>
		</Rcdata>
	</Resources>
</MediaCenterThemer>

Sample 4

This sample modifies the text of four labels in the start menu of Media Center.

<MediaCenterThemer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MCTSchema.xsd">
	<!-- Sample file to modify some of the text of Media Center -->
	<TextFormat>
		<!-- This modifies the font of some of the text -->
		<Text Color="rgb(151,217,255)" Font="Segoe Media Center">
			<Replace Font="Comic Sans MS" Bold="true" />
		</Text>
	</TextFormat>

	<Resources>
		<Strings>
			<!-- Modify three strings of text from Media Center -->
			<String Id="14030">All my Pics</String>
			<String Id="14002">Wowbagger</String>
			<String Match="shut down">bye bye</String>

			<!-- Modify the menu title of the Heatwave add-on -->
			<String Match="Weather">How's the weather?</String>
		</Strings>

	</Resources>
</MediaCenterThemer>

Sample 5

This sample shows how to hide the Extras menu from Media Center’s start menu, re-position TV, Music and Tasks on top of the menu (in that order), hide/reorder some of the menu items of Tasks, and add a new menu strip with access to a web site and the Window’s calculator. Pictures used in this sample come from resources extracted from Media Center using the LogResources setting.

<MediaCenterThemer xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="MCTSchema.xsd">
	<!-- Sample file to modify the start menu of Media Center -->
	<StartMenu>
		<!-- Changes to the built-in menus -->
		<Builtin>
			<Extras Visible="false"/>
			<Music Order="2"/>
			<TV Order="1"/>

			<Tasks Order="3">
				<MenuItem Name="Shutdown" Visible="false"/>
				<MenuItem Name="Settings" Visible="false"/>
				<MenuItem Name="Synchronize" Order="1"/>
			</Tasks>
		</Builtin>

		<!-- Addition of a new menu strip -->
		<Custom Title="My Theme Menu">
			<MenuItem Name="Display web site" HideToolbar="true">
				<Image>Logged Resources\ehres.dll\rcdata\SKITTLE.BOTTOM.PIECE.PNG</Image>
				<Link>http://www.patchou.com/projects/media-center-themer/</Link>
			</MenuItem>

			<MenuItem Name="Launch calculator">
				<Image>Logged Resources\ehres.dll\rcdata\STARTMENU.QUICKLINK.PICTURES.PLAYFAVS.FOCUS.PNG</Image>
				<Program>%windir%\system32\calc.exe</Program>
				<PlayingDirective>pause</PlayingDirective>
			</MenuItem>
		</Custom>
	</StartMenu>
</MediaCenterThemer>
  • Archive

  • Categories

  • Blogroll