View Single Post
Old 05-18-2007, 08:06 AM   #6
fenrian1
A Shissar Defiler
 
fenrian1's Avatar
 
Join Date: Jun 2005
Posts: 164
Interface Author - Click to view interfaces
Default

I quick tutorial then, the target window is an excellent piece to start with since its so simple. Please excuse me if I start to sound pendantic here =).

From the EQUI_TargetWindow

Quote:
<Screen item="TargetWindow">
<ScreenID />
<RelativePosition>false</RelativePosition>
<Location>
<X>516</X>
<Y>242</Y>
</Location>
<Size>
<CX>147</CX>
<CY>50</CY>
</Size>
<Style_VScroll>false</Style_VScroll>
<Style_HScroll>false</Style_HScroll>
<Style_Transparent>false</Style_Transparent>
<TooltipReference>Your CurrentTarget</TooltipReference>
<DrawTemplate>WDT_Filigree2</DrawTemplate>
<Style_Titlebar>true</Style_Titlebar>
<Style_Closebox>false</Style_Closebox>
<Style_Minimizebox>false</Style_Minimizebox>
<Style_Border>true</Style_Border>
<Style_Sizable>false</Style_Sizable>
<Pieces>Target_HP</Pieces>
<Pieces>Target_HPLabel</Pieces>
<Pieces>Target_HPPercLabel</Pieces>
<Pieces>A_TargetBoxStaticAnim</Pieces>
</Screen>



This will direct us to the EQUI_Templates file

Quote:
<Border>
<Right>A_Filigree2Right</Right>
<RightBottom>A_Filigree2RightBottom</RightBottom>
<BottomRight>A_Filigree2BottomRight</BottomRight>
<Bottom>A_Filigree2Bottom</Bottom>
<BottomLeft>A_Filigree2BottomLeft</BottomLeft>
<LeftTop>A_Filigree2LeftTop</LeftTop>
<Left>A_Filigree2Left</Left>
<LeftBottom>A_Filigree2LeftBottom</LeftBottom>
<OverlapLeft>0</OverlapLeft>
<OverlapTop>0</OverlapTop>
<OverlapRight>0</OverlapRight>
<OverlapBottom>0</OverlapBottom>
<Top>A_Filigree2Top</Top>
<TopLeft>A_Filigree2TopLeft</TopLeft>
<TopRight>A_Filigree2TopRight</TopRight>
<RightTop>A_Filigree2RightTop</RightTop>
</Border>


This will then direct us to the Animations file

Quote:
<Ui2DAnimation item="A_Filigree2RightTop">
<Cycle>true</Cycle>
<Frames>
<Texture>window_pieces05.tga</Texture>
<Location>
<X>43</X>
<Y>174</Y>
</Location>

<Size>
<CX>16</CX>
<CY>11</CY>
</Size>
<Hotspot>
<X>0</X>
<Y>0</Y>
</Hotspot>
<Duration>1000</Duration>
</Frames>
</Ui2DAnimation>QUOTE]

The bolded print directs us to another part in the animations file that defines the tga file used and how big it is making it a global constant.

[QUOTE] <TextureInfo item="window_pieces05.tga">
<Size>
<CX>256</CX>
<CY>256</CY>
</Size>
</TextureInfo>


The text in red tells us where on window_pieces05.tga the top right corner of the part is in co-ordinates from the upper left corner. The co-ordinates are given in pixels, so the piece is 43 pixels to the right and 174 pixels down. Its size is 16x11


All of this can be done in the target window itself. if you look at the code for the target window, you will see it starts with all the texture and animations code for the target box. The target box is not used in any other UI piece, so its safe to leave it here since it does not need to be global. If you want to make animations and templates global, they need to either be added to the animations and templates files, or they can be added to the beginning of the actions window. The actions window is the first UI piece to load. If you look at my Veliouse UI, it has a custom animation for every window and has custom window templates for some, all of that code is in the actions window and it survived the may16 patch with out a hiccup since SOE never seems to modify this UI piece.
fenrian1 is offline   Reply With Quote