This document aims to inform you of the methods for placing borders on HUD items, and for removing them if already there.
We'll start with removing borders from the default HUD, as this is easy.
A lot of the default HUD borders are placed using macros of the type:
Q3F_ITEM_BORDER_FILLED_NEW(...) Q3F_ITEM_BORDER(...)These are macros defined in ui/menudef.h. To remove a border defined this way simply comment the line out by putting // in front of it:
//Q3F_ITEM_BORDER_FILLED_NEW(...) //Q3F_ITEM_BORDER(...)
Other borders are defined with a type ITEM_TYPE_BORDER in an itemDef. To remove these you have several options:
loadborderbitmap 0 "ui/gfx/hud/top_left" loadborderbitmap 1 "ui/gfx/hud/fill_left" loadborderbitmap 2 "ui/gfx/hud/bot_left" loadborderbitmap 3 "ui/gfx/hud/fill_top" loadborderbitmap 4 "ui/gfx/hud/fill_center_grey" loadborderbitmap 5 "ui/gfx/hud/fill_bot" loadborderbitmap 6 "ui/gfx/hud/top_right" loadborderbitmap 7 "ui/gfx/hud/fill_right" loadborderbitmap 8 "ui/gfx/hud/bot_right"
visible MENU_TRUEinto:
visible MENU_FALSEIn many ways this is a better method to remove all borders as well, as it means the code does no work drawing these items past checking the visible flag. I'd still comment the loadborderbitmap lines as well though, for extra efficiency.
There's another way to make a very simple border on an object, which will be explaind in detail below. These are simple rectangles and can be removed by commenting out the itemDef's:
border <x>where <x> is a non-zero value.
As mentioned above there are a number of macros defined in ui/menudef.h for putting borders around objects. Each of these actually puts an entire itemDef into your hud.menu file, so don't use them within another itemDef, but do place them within a menuDef.
Note that these macros are defined by the q3f development team and may be subject to change between releases. They use them in the default HUD they define. If something here doesn't work it's likely I'm either not aware of a change in a new release or haven't had time to document it yet.
Macro | Arguments/Comments |
---|---|
Q3F_ITEM_BORDER_FILLED_NEW(Q3F_BRD_X, Q3F_BRD_Y, Q3F_BRD_WIDTH, Q3F_BRD_HEIGHT) |
|
Q3F_ITEM_BORDER(Q3F_BRD_X, Q3F_BRD_Y, Q3F_BRD_WIDTH, Q3F_BRD_HEIGHT) | Same arguments as for Q3F_ITEM_BORDER_FILLED_NEW. |
I'm going to stop there for now, as the dev team could easily change any of this as I said. If you desperately need a border the two above are probably enough to get you what you want. Note that due to not being able to use custom graphics you are stuck with just the above for graphical borders.
I mentioned simple rectangular borders above. You use 3 keywords in an itemDef to define one.
Keyword | Comments |
---|---|
border <style> | Specifies the style of border, for possible values see Border Styles |