Home Forum Downloads My Favorites Register FAQ Mark Forums Read

Go Back   EQInterface Forums > Tutorials & Info. > Graphics Tutorials & Info.
User Name
Password

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
Old 08-19-2002, 12:00 AM   #1
Muse
EQ Atlas Webmaster
 
Join Date: Aug 2002
Posts: 67
Default Graphics help

I wrote up the following after spending some time this weekend figuring out how graphics are used in the GUI. I hope some find it useful, and I'll add more as I find it out.

The fundamental graphic file is the "texture" file, which is any graphic you want to use. This file is included in the xml with the tab <TextureInfo>, and typically has a <Name> and <Size> attributes. The texture file itself can be any actual size you want, it does not have to be in a multiple of 256. It can also be .tga, .png, or .jpg (those are the only ones I've tried).

When you declare a texture file in the <TextureInfo> tag, you can again set the size to be whatever you want to, typically this will be the same size as the actual texture. If you set it to a different size, however, the image will be scaled to whatever size you set, similar to the "Modify>Image Size" feature of most graphics programs. For instance, a 200x200 texture that is labeled as having size 512x512 in the <TextureInfo><Size> attributes will expand to fill that area (and get pretty bad looking in the process).

Now we move onto higher levels and what they do to images. First let's step back and look at the heirarchy of tags in a typical page. You have to declare what a specific item is prior to using it in most cases, so the order in the actual XML file is kind of a reverse heirarchy (the highest level item is at the bottom). In order from highest to lowest (for what I'm doing anyway) the files look like this: Screen > Page > StaticAnimation > Ui2DAnimation > TextureInfo. In the actual file, as you go down they go in the reverse order of this (TextureInfo > Ui2DAnimation etc) because you need to name the textures prior to using them in the Ui2DAnimations, and so on.

With that in mind: the next step is using the TextureInfo item in a Ui2DAnimation item. The Ui2DAnimation item can hold many textures within the Frames that it has, each one is a different frame. The thinking behind this is that, since it is expecting to hold more than one texture, it just assumes that the TextureInfo>Size is correct, and won't rescale images. Instead, it crops or tiles them, depending on what you did. If you make the Ui2DAnimation>Frame the same Size as the TextureInfo, you see the image once normally. If you make it smaller than the TextureInfo, the texture is cropped. If it's larger, the texture is tiled to fill the area.

As an example, the 200x200 texture, declared as 200x200, but filling a 512x512 Ui2DAnimation>Frame will appear 2.5 times both sideways and up and down within that Frame.

Next, Ui2DAnimations are held within StaticAnimation items as the StaticAnimation>Animation element. What happens with this is a little weird, but basically the StaticAnimation will scale the Ui2DAnimation much like the original TextureInfo did to the texture if the sizes don't match. Although you could probably use this for something fancy (I have no idea what), I would make sure that the total dimensions of your Ui2DAnimations match the size of the StaticAnimation they're in or you will get oddly scaled items.

Pages don't have sizes, so you don't have to worry about them, other than to make sure they allow scrolling if you are using multiple Pages (like in a TabBox). The Screen itself allows resizing and scrollbars as well, in case you aren't using multiple Pages or for whatever else you want to do. I honestly haven't played with it that much.

Hope this helps, and add in comments and such, I'm sure I've missed a fair amount.
__________________
Muse
EQ Atlas
Muse is offline   Reply With Quote
 



Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off


All times are GMT -5. The time now is 09:08 PM.


vBulletin Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
© MMOUI