OG Xbox Forums > MXM WIP Beta forum

How To Setup Rotating Menu...?

<< < (2/5) > >>

yourwishismine:
QUOTE (geniusalz @ Jan 21 2004, 02:06 PM) Check out this tool I wrote to get zpoint tags easily.
As usual, vb runtimes are required.
Damn genuisaltz,

you should stop coding in VB and use a real language like C++. :P  

geniusalz:
Why spend an hour doing something when it can be done in 5 mins?

As for the menu:

Here's the points being used:
QUOTE   <MenuP1>
  <Point X="220" Y="183" Z="1.0" N="1.0" TU="0.0" TV="0.0" />
  <Point X="342" Y="100" Z="1.0" N="1.0" TU="1.0" TV="0.0" />
  <Point X="356" Y="127" Z="1.0" N="1.0" TU="1.0" TV="1.0" />
  <Point X="233" Y="211" Z="1.0" N="1.0" TU="0.0" TV="1.0" />
  </MenuP1>
  <Menu0>
  <Point X="239" Y="231" Z="1.0" N="1.0" TU="0.0" TV="0.0" />
  <Point X="380" Y="231" Z="1.0" N="1.0" TU="1.0" TV="0.0" />
  <Point X="380" Y="266" Z="1.0" N="1.0" TU="1.0" TV="1.0" />
  <Point X="239" Y="266" Z="1.0" N="1.0" TU="0.0" TV="1.0" />
  </Menu0>
  <MenuN1>
  <Point X="234" Y="288" Z="1.0" N="1.0" TU="0.0" TV="0.0" />
  <Point X="355" Y="369" Z="1.0" N="1.0" TU="1.0" TV="0.0" />
  <Point X="341" Y="399" Z="1.0" N="1.0" TU="1.0" TV="1.0" />
  <Point X="220" Y="316" Z="1.0" N="1.0" TU="0.0" TV="1.0" />
  </MenuN1>


And here's the text elements used to make a menu:
      <LayoutElement Type="Text" Source="CGTitle" Section="-1">
         <TextColor>0xD4FFFFFF</TextColor>
         <Pos ZPoints="MenuP1"  L="107" T="238" W="205" H="52" />
         <Scaling Y="True" X="false" />
         <Proportional>true</Proportional>
         <Modifier Type="Tweener">
         <Source>MenuScroll</Source>
         <Ease>Both</Ease>
         <Next>Menu0</Next>
         <Prev>MenuP2</Prev>
         <PrevColor>0xA8FFFFFF</PrevColor>
         <NextColor>0xFFFFFF00</NextColor>
         </Modifier>
         <XPos L="126" T="151" W="132" H="27"/>
      </LayoutElement>
      <LayoutElement Type="Text" Source="CGTitle">
         <TextColor>0xFFFFFF00</TextColor>
         <XPos L="136" T="183" W="183" H="52"/>
         <Pos ZPoints="Menu0" L="107" T="238" W="205" H="52" />
         <Scaling Y="True" X="false" />
         <Proportional>true</Proportional>
         <Modifier Type="Tweener">
         <Source>MenuScroll</Source>
         <Ease>Both</Ease>
         <Next>MenuN1</Next>
         <Prev>MenuP1</Prev>
         <PrevColor>0xD4FFFFFF</PrevColor>
         <NextColor>0xD4FFFFFF</NextColor>
         </Modifier>
         <IsMenu Wrapped="true" Horizontal="false">true</IsMenu>
      </LayoutElement>
      <LayoutElement Type="Text" Source="CGTitle" Section="1">
         <TextColor>0xD4FFFFFF</TextColor>
         <Pos ZPoints="MenuN1" L="107" T="238" W="205" H="52" />
         <Scaling Y="True" X="false" />
         <Proportional>true</Proportional>
         <Modifier Type="Tweener">
         <Source>MenuScroll</Source>
         <Ease>Both</Ease>
         <Next>MenuN2</Next>
         <Prev>Menu0</Prev>
         <PrevColor>0xFFFFFF00</PrevColor>
         <NextColor>0xA8FFFFFF</NextColor>
         </Modifier>
         <XPos L="123" T="210" W="186" H="32"/>
      </LayoutElement>

The rest should be self-explanatory

Whenever you define a 'section' attribute, it gets the next or previous title, as opposed to the current title.  So your menu is really a bunch of text elements showing titles with 'section' as -2, -1, 0, 1, 2
Negative is previous, positive is next, 0 is current.  You don't need to say section="0" because that's the default.

BenJeremy:
Yes, ZPoints can be a bit daunting.... the idea is that ZPoints are 3-D coordinates, and an element can be comrpised of 3 or more of these points (yes, even complex shapes). They include texture coordinates, which determines how the image or text is mapped to the resulting shape.

In the simplest format, you can merely define 4 ZPoints in a square and forget the complicated 3-D stuff.

I made these named sets primarily to make it easier for various elements to "share" these sets of points for tweening operations. These allow you to smoothly transition between two different locations when the menu selection is changed, for example.  

geniusalz:
You could support a simplified version, like so:

<PointSetName>
<Rectangle x="50" y="50" h="10" w="100" rotate="50" />
</PointSetName>

Which will just display the element rotated 50 degrees clockwise, using the x and y values as the pivot.

This could also be specified in the pos tag.  

BenJeremy:
QUOTE (geniusalz @ Jan 21 2004, 08:26 PM) You could support a simplified version, like so:

<PointSetName>
<Rectangle x="50" y="50" h="10" w="100" rotate="50" />
</PointSetName>

Which will just display the element rotated 50 degrees clockwise, using the x and y values as the pivot.

This could also be specified in the pos tag.
Yes, I was thinking about doing this.  

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version