View Single Post
Old 08-20-2006, 01:48 PM   #2
Griswald
 
Join Date: Aug 2002
Location: ent->ps.get_loc();
Posts: 25
I myself am currently doing all the UI work to RKR (http://www.rkredemption.com), and have run into this many times.

The number one thing to remember, is that all tga files that are used in the HUD must be in powers of 2 for it's dimensions. ( 2, 4, 8, 16, 32, 64, 128, 256, 512, 1024, 2048 )

If said image is... say... 65x64 or anything not in a power 2, all you see ingame is the big black box.

Another thing to remember, is that the UI itself is only treated as 640x480, so anything larger then those will be ignored / not drawn (though, that dosen't appear to be the case here)

My only recommendation is check the width and height of your tga's, check that there's a proper shader entry for said graphics, and then you shouldn't have an issue.

An example of an image I added to the UI was a "flower" instead of the blue glow behind the text, but I wanted it to look good, and have it's own unique id, rather then "button_back" or whatever it was.

This image is /gfx/menus/menu_flower.tga and is 32x32 pixels. Now, not only do you have to have the entry in your UI code for it to appear, you need it in a shader file (I modded the ui.shader file located at /shaders/ui.shader), and here's what MY entry looks like:

Code:
gfx/menus/menu_flower
{
    {
        map gfx/menus/menu_flower
        blendFunc GL_SRC_ALPHA GL_ONE_MINUS_SRC_ALPHA
    }
}

Also, an invaluable resource to figuring out what does what would be to look at the following as well:
http://www.gamingforums.com/showthread.php?p=1078156


-- Griswald, RKR Project Co-Leader
Griswald is offline   you may: quote & reply,