Ownerdraw Values
The types of things that can be drawn by ownerdraw can be broken down into four catagories, text, graphics, models and cinematics. We'll look at each group individually.
Text Values
Since these items are based on text you must have all the text related commands defined in the item. The basic item text commands that need defining are :
- text
- textstyle
- textscale
- textalign
- textalignx
- textaligny
The text based ownerdraw values are :
- UI_HANDICAP
- draw the value of the "handicap" cvar, which has a range of 5 to 100.
- left clicking or Return on the item window area will increase the cvar by 5.
- right clicking will decrease it by 5.
- UI_CLANNAME
- draw the contents of the "ui_teamName" cvar.
- left clicking or Return on the item window area will advance the cvar to the next team name.
- right clicking will move it to the previous team name.
- UI_GAMETYPE
- draw the gametype name.
- left clicking or Return on the item window area will advance to the next game type.
- right clicking will move it to the previous game type.
- UI_SKILL
- draw the value of the "g_spSkill" cvar.
- left clicking or Return on the item window area will increase the cvar
by 1.
- right clicking will decrease it by 1.
- UI_BLUETEAMNAME
- draw the contents of the "ui_blueTeam" cvar.
- left clicking or Return on the item window area will advance the cvar to the next team name in the list.
- right clicking will move it to the previous team name.
- UI_REDTEAMNAME
- draw the contents of the "ui_redTeam" cvar.
- left clicking or Return on the item window area will advance the cvar to the next team name in the list.
- right clicking will move it to the previous team name.
- UI_BLUETEAM1 to UI_BLUETEAM5
- draw the contents of the "ui_blueteam1" to "ui_blueteam5" cvar.
- left clicking or Return on the item window area will advance to the next member name.
- right clicking will move it to the previous team member.
- UI_REDTEAM1 to UI_REDTEAM5
- draw the contents of the "ui_redteam1" to "ui_redteam5" cvar.
- left clicking or Return on the item window area will advance to the next member name.
- right clicking will move it to the previous team member.
- UI_REDBLUE
- draw "Red" or "Blue" depending on which team the player is on.
- left clicking, right clicking or Return on the item window area will change the text.
- UI_NETSOURCE
- draw the current net source, Local, Internet or Favorites.
- left clicking or Return on the item window area will move to the next source.
- right clicking will move it to the previous source.
- UI_NETFILTER
- draw the server type being used. Preface with "Filter : ".
- left clicking or Return on the item window area will move to the next server type.
- right clicking will move it to the previous type.
- UI_TIER
- draw the value of the "ui_currentTier" cvar. Preface with "Tier : ".
- UI_TIER_MAPNAME
- draw the name of the current map in the current tier
- UI_TIER_GAMETYPE
- draw the game type of the current map in the current tier.
- UI_ALLMAPS_SELECTION
- draw the name of the current net map.
- UI_OPPONENT_NAME
- draw the contents of the "ui_opponentName" cvar.
- left clicking or Return on the item window area will advance the cvar to the next team name.
- right clicking will move it to the previous team name.
- UI_BOTNAME
- draw the name of the currently selected bot.
- left clicking or Return on the item window area will move to the next bot.
- right clicking will move to the previous bot.
- UI_BOTSKILL
- draw the skill level of the currently selected bot.
- left clicking or Return on the item window area will move to the next higher level.
- right clicking will move to the next lower level.
- UI_SELECTEDPLAYER
- if you are the team leader draw the contents of the "cg_selectedPlayerName" cvar. Otherwise draw the contents of the "name" cvar.
- if you are the team leader left clicking or Return on the item window area will advance the cvar to the next team player.
- if you are the team leader right clicking on the item window area will move it to the previous team player.
- UI_NETGAMETYPE
- draw the current type of game selected.
- left clicking or Return on the item window area will move to the next game type.
- right clicking will move to the previous game type.
- UI_SERVERREFRESHDATE
- draw the time of the last server refresh.
- UI_SERVERMOTD
- draw the server's message of the day.
- UI_GLINFO
- draw the OpenGl info. This information is contained in multiple lines.
- UI_KEYBINDSTATUS
- draws a message depending on the current status of binding a key. If it is not waiting for a key to bind to an action it displays "Press ENTER or CLICK to change, Press BACKSPACE to clear". If it is waiting for a key the display is "Waiting for new key... Press ESCAPE to cancel".
- UI_MAP_TIMETOBEAT
- draws the time to beat for this map in minutes and seconds.
- UI_JOINGAMETYPE
- draws the type of game that is selected to join. Based on the value of the "ui_joinGameType" cvar.
- left clicking or Return on the item window area will move to the next game type.
- right clicking will move to the previous game type.
- UI_MAPS_SELECTION
- draw the name of the current map.
Graphic Values
The items using the graphic ownerdraw values can also be text based so you can include text with the graphic. If you do this then you must have all the text related commands defined in the item. The ownerdraw graphic will be drawn 8 pixels to the right of the text.
- UI_EFFECTS
- draw the effects slider with the highlight set to the selected color. The window area must be, at a minimum 128x8 in size.
- left clicking or Return on the item window area will move to the next color.
- right clicking will move to the previous color.
- UI_CLANLOGO
- draw the image that is defined for the current team.
- UI_MAPPREVIEW
- draw the graphic in the levelshots directory whose name matches the current map name. If no graphic is found then draw the "menu/art/unknownmap" graphic.
- UI_NETMAPPREVIEW
- draw the graphic in the levelshots directory whose name matches the current net map name. If no graphic is found then draw the "menu/art/unknownmap" graphic.
- UI_TIERMAP1
- draw the graphic in the levelshots directory whose name matches the first tier map name. If no graphic is found then draw the "menu/art/unknownmap" graphic.
- UI_TIERMAP2
- draw the graphic in the levelshots directory whose name matches the second tier map name. If no graphic is found then draw the "menu/art/unknownmap" graphic.
- UI_TIERMAP13
- draw the graphic in the levelshots directory whose name matches the third tier map name. If no graphic is found then draw the "menu/art/unknownmap" graphic.
- UI_PLAYERLOGO
- draw the image that is defined for the team the player is on.
- UI_OPPONENTLOGO
- draw the image that is defined for the team the opponent, as defined by the "ui_opponentName" cvar, is on.
- UI_PLAYERLOGO_METAL
- draw the _metal image that is defined for the team the player is on.
- UI_OPPONENTLOGO_METAL
- draw the _metal image that is defined for the team the opponent, as defined by the "ui_opponentName" cvar, is on.
- UI_PLAYERLOGO_NAME
- draw the _name image that is defined for the team the player is on.
- UI_OPPONENTLOGO_NAME
- draw the _name image that is defined for the team the opponent, as defined by the "ui_opponentName" cvar, is on.
- UI_CROSSHAIR
- draw the current selected crosshair using the item's foreground color.
- left clicking or Return on the item window area will move to the next crosshair.
- right clicking will move to the previous crosshair.
Model Values
These ownerdraw values draw player models in the item's window area.
- UI_PLAYERMODEL
- draw the currently selected full player model. If the value of the "ui_Q3Model" cvar is 1 then the "model" and "headmodel" cvars are used to select the model. If the value is 0 then the "team_model" and "team_headmodel" cvars are used.
- The viewing angle of the model is set by the "ui_PlayerViewAngleYaw" and "ui_PlayerViewAnglePitch" cvars.
- The movement angle of the model is set by the "ui_PlayerMoveAngleYaw" and "ui_PlayerMoveAnglePitch" cvars.
- The animation of the lower body is set by the value of the "ui_LowerAnim" cvar. The animation of the upper body is set by the "ui_UpperAnim" cvar.
- The weapon held by the model is set by the "ui_Weapon" cvar.
- UI_OPPONENTMODEL
- draw the player model that is defined by the "ui_opponentModel" cvar. This model is viewed head on with an idle animation and machinegun weapon.
Cinematic Values
These values play an Roq movie in the item's window area. The movie is stretched or shrunk to fit the window area.
- UI_MAPCINEMATIC
- play the Roq movie whose name matches the name of the currently selected map, as set the "ui_currentMap" cvar. The movie must be in the video directory. If no movie is avalible, the graphic in the levelshots directory whose name matches the map name is used. If no graphic is found then draw the "menu/art/unknownmap" graphic.
- UI_NETMAPCINEMATIC
- play the Roq movie associated with the currently selected net map. The movie must be in the video directory. If no movie is avalible, the graphic in the levelshots directory whose name matches the map name is used. If no graphic is found then draw the "menu/art/unknownmap" graphic.
- UI_CLANCINEMATIC
- play the Roq movie whose name matches the name of the player's team logo. The movie must be in the video directory. If no movie is avalible show the team metal logo instead.
- UI_PREVIEWCINEMATIC
- play the Roq movie that is selected by the List Box using the FEEDER_CINEMATICS feeder. The movie must be in the video directory.
- UI_STARTMAPCINEMATIC
- play the Roq movie whose name matches the name of the currently selected map, as set the "ui_currentNetMap" cvar. The movie must be in the video directory. If no movie is avalible, the graphic in the levelshots directory whose name matches the map name is used. If no graphic is found then draw the "menu/art/unknownmap" graphic.
|