OG Xbox Forums > Xbox Homebrew Software

Complex Skins In Mxm

(1/3) > >>

BenJeremy:
For those interested in complex skinning (you out there, Weavus?), I'm starting this thread to discuss the best way to do the complex skinning. Currently, my design will also allow the source code to be used for other projects as well.

Anyway, here's what I've put down so far:


Notes on Complex Skinning:
XMl files will define two primary things:

Resources and Layouts.

Resources are those items which can be used globally in the skin, and are defined exactly once.
Once Images are defined, they can be used anywhere images are defined in layouts, in use as masks,
backgrounds, etc.

Resources:
Fonts
 Defined by an XPR file.
Images
 Any image file  

Layouts will consist of images, text, and special fields.

Images will have several attributes, including Mask Image, AlphaEnable, and AlphaColor. Sources can
include fixed (skin directory based), local (such as screenshots), and generated.




I plan on creating a fairly generic skin renderer, which could be used on other things as
well (such as a media player, dashboard, or game interface).


Fonts and masks must be defined as resources.


Here's an example of a partial skin definition xml file:
QUOTE
<Skin>
<Resources>
 <Font Name="Font16">
  <File>Font16.xpr</File>
 </Font>
<Image Name="ShotMask">
 <File>Mask1.jpg</File>
</Image>
</Resources>
<Layouts>
<Layout Name="Menu">
 <LayoutElement Type=Image>
  <Source>Fixed</Source>
  <File>MenuBack.jpg</File>
 </LayoutElement>
 <LayoutElement Type=Image>
  <Source>Local</Source>
  <Tag>CoverShot</Tag>
  <AutoBasename>MXM_COVER</AutoBasename>
  <Location>40,50</Location>
  <Size>200,300</Size>
 </LayoutElement>
 <LayoutElement Type=Image>
  <Source>Local</Source>
  <Tag>ScreenShot1</Tag>
  <AutoBasename>MXM_SS1</AutoBasename>
  <Location>240,250</Location>
  <Size>64,64</Size>
  <Mask>ShotMask</Mask>
 </LayoutElement>
 <LayoutElement Type=Image>
  <Source>Local</Source>
  <Tag>ScreenShot2</Tag>
  <AutoBasename>MXM_SS2</AutoBasename>
  <Location>340,250</Location>
  <Size>64,64</Size>
  <Mask>ShotMask</Mask>
 </LayoutElement>
 <LayoutElement Type=TextBox>
  <Source>Local</Source>
  <Tag>LongDescr</Tag>
  <Location>240,50</Location>
  <Size>200,175</Size>
  <Justify>Center</Justify>
  <Font>Font16</Font>
  <Color>0xffffffff</Color>
  <Shadow>0x80000000</Shadow>
 </LayoutElement Type=MenuChoice>
  <Font>Font16</Font>
  <Location>100,350</Location>
  <Size>450,50</Size>
  <Resize>KeepAspect</Resize>
  <NumChoices>1</NumChoices>
  <Orientation>LeftRight</Orientation>
  <Color>0xffffffff</Color>
  <Shadow>0x80000000</Shadow>
 <LayoutElement Type=MenuArrowLeft>
  <Location>50,350</Location>
  <Size>50,50</Size>
  <Color>0xffffffff</Color>
  <Shadow>0x80000000</Shadow>
 </LayoutElement>
 <LayoutElement Type=MenuArrowRight>
  <Location>500,350</Location>
  <Size>50,50</Size>
  <Color>0xffffffff</Color>
  <Shadow>0x80000000</Shadow>
 </LayoutElement>
</Layout>
</Layouts>



From a programming standpoint, "special things" like menus will be handled by the application through an inherited class or via registered callbacks. The skin class will handle resource management, up to a point.

Technically, as I've envisioned it, you'd even be able to use video files as masks, and other, more complex interactions may also be utilized (bumpmapping, for example) for cool visual effects.

At any rate, there will be a new release tonight, alas, without the complex skinning yet.

Weavus:
You had to spoil the party with the line 'new release tonight.... without complex skinning' ;)

I was hoping you had put in a 72 hour weekend to get this stuff all finished.

Weavus:
It all looks very good but I think feedback is going to be hard without getting to play with it and see what works and what dosnt.

Would it be possible to alter the layout depening on if an item has a description/screenshot1/screenshot2 etc? Or is that going to be really hard?

Anyway it sounds great, cant wait to get hold of it...

Weavus:
Are all the images for items .e.g box,screens etc still loaded by a single thread or do they each get their own thread and load simultanously?

How about an option to preload all images needed? I know the Xbox has a limited amount of RAM available but my media dir of boxcovers/screens is less than 3mb so it should be able to handle that no problem.

BenJeremy:
QUOTE (Weavus @ Dec 16 2002, 02:27 PM)You had to spoil the party with the line 'new release tonight.... without complex skinning'

I was hoping you had put in a 72 hour weekend to get this stuff all finished.
                                    Well, I was hoping, too.... but I just got too busy with other things. I guess the wife and family expects me to crawl out of the computer room once and a while

Navigation

[0] Message Index

[#] Next page

Go to full version