The ownerdraw commands affected by the code changes made in this tutorial are :
- ownerdraw CG_PLAYER_HEALTH
- ownerdraw CG_PLAYER_AMMO_VALUE
- ownerdraw CG_PLAYER_ARMOR_VALUE
Note : in the standard Team Arena scripted hud these commands format their text so it is centered in the item's window. After the tutorial code changes, if no align command is present in the item definition, the text will be formatted so it is displayed on the left of the item's window. This can affect the look of the hud unless a script change is made.
To set the horizontal text alignment for the above ownerdraw commands we must include an align command in the item's definition. This command can have one of the following forms :
- align ITEM_ALIGN_LEFT - align text to the left side of the item window
- align ITEM_ALIGN_CENTER - align text to the center of the item window
- align ITEM_ALIGN_RIGHT - align text to the right side of the item window
If no align command is present then the text is aligned to the left of the item's window.