summaryrefslogtreecommitdiff
path: root/src/ui
diff options
context:
space:
mode:
authorTim Angus <tim@ngus.net>2009-10-03 12:46:30 +0000
committerTim Angus <tim@ngus.net>2013-01-03 00:16:13 +0000
commit120a3dd717954482db9109358f26b009f05d0421 (patch)
treea11dbb06594df9b6bfb954769a979b77f89d0a42 /src/ui
parent947d079b94b7cfb2cf42d612ede728c34552d373 (diff)
* Various changes resulting from sanity checking against mgdev HEAD
Diffstat (limited to 'src/ui')
-rw-r--r--src/ui/ui_atoms.c5
-rw-r--r--src/ui/ui_main.c29
-rw-r--r--src/ui/ui_shared.c6
-rw-r--r--src/ui/ui_shared.h8
4 files changed, 25 insertions, 23 deletions
diff --git a/src/ui/ui_atoms.c b/src/ui/ui_atoms.c
index 32df5491..c78df7ff 100644
--- a/src/ui/ui_atoms.c
+++ b/src/ui/ui_atoms.c
@@ -128,7 +128,6 @@ static void UI_MessageMode_f( void )
char *arg = UI_Argv( 0 );
trap_Cvar_Set( "ui_sayBuffer", "" );
- uiInfo.chatTeam = qfalse;
switch( arg[ 11 ] )
{
@@ -189,8 +188,8 @@ qboolean UI_ConsoleCommand( int realTime )
if( Q_stricmp( commands[ i ].cmd, cmd ) == 0 )
{
commands[ i ].function( );
- }
- return qtrue;
+ return qtrue;
+ }
}
return qfalse;
diff --git a/src/ui/ui_main.c b/src/ui/ui_main.c
index d1af8f85..9854bda7 100644
--- a/src/ui/ui_main.c
+++ b/src/ui/ui_main.c
@@ -1890,7 +1890,8 @@ static void UI_OwnerDraw( float x, float y, float w, float h,
float text_x, float text_y, int ownerDraw,
int ownerDrawFlags, int align,
int textalign, int textvalign, float special,
- float scale, vec4_t color, qhandle_t shader, int textStyle )
+ float scale, vec4_t foreColor, vec4_t backColor,
+ qhandle_t shader, int textStyle )
{
rectDef_t rect;
@@ -1903,63 +1904,63 @@ static void UI_OwnerDraw( float x, float y, float w, float h,
{
case UI_TEAMINFOPANE:
UI_DrawInfoPane( &uiInfo.teamList[ uiInfo.teamIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_ACLASSINFOPANE:
UI_DrawInfoPane( &uiInfo.alienClassList[ uiInfo.alienClassIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_AUPGRADEINFOPANE:
UI_DrawInfoPane( &uiInfo.alienUpgradeList[ uiInfo.alienUpgradeIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_HITEMINFOPANE:
UI_DrawInfoPane( &uiInfo.humanItemList[ uiInfo.humanItemIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_HBUYINFOPANE:
UI_DrawInfoPane( &uiInfo.humanArmouryBuyList[ uiInfo.humanArmouryBuyIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_HSELLINFOPANE:
UI_DrawInfoPane( &uiInfo.humanArmourySellList[ uiInfo.humanArmourySellIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_ABUILDINFOPANE:
UI_DrawInfoPane( &uiInfo.alienBuildList[ uiInfo.alienBuildIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_HBUILDINFOPANE:
UI_DrawInfoPane( &uiInfo.humanBuildList[ uiInfo.humanBuildIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_HELPINFOPANE:
UI_DrawInfoPane( &uiInfo.helpList[ uiInfo.helpIndex ],
- &rect, text_x, text_y, scale, textalign, textvalign, color, textStyle );
+ &rect, text_x, text_y, scale, textalign, textvalign, foreColor, textStyle );
break;
case UI_NETMAPPREVIEW:
- UI_DrawServerMapPreview( &rect, scale, color );
+ UI_DrawServerMapPreview( &rect, scale, foreColor );
break;
case UI_SELECTEDMAPPREVIEW:
- UI_DrawSelectedMapPreview( &rect, scale, color );
+ UI_DrawSelectedMapPreview( &rect, scale, foreColor );
break;
case UI_SELECTEDMAPNAME:
- UI_DrawSelectedMapName( &rect, scale, color, textStyle );
+ UI_DrawSelectedMapName( &rect, scale, foreColor, textStyle );
break;
case UI_GLINFO:
- UI_DrawGLInfo( &rect, scale, textalign, textvalign, color, textStyle, text_x, text_y );
+ UI_DrawGLInfo( &rect, scale, textalign, textvalign, foreColor, textStyle, text_x, text_y );
break;
default:
diff --git a/src/ui/ui_shared.c b/src/ui/ui_shared.c
index 315f6135..de433a85 100644
--- a/src/ui/ui_shared.c
+++ b/src/ui/ui_shared.c
@@ -5163,9 +5163,7 @@ static bind_t g_bindings[] =
{ "scoresUp", K_KP_PGUP, -1, -1, -1 },
{ "scoresDown", K_KP_PGDN, -1, -1, -1 },
{ "messagemode", -1, -1, -1, -1 },
- { "messagemode2", -1, -1, -1, -1 },
- { "messagemode3", -1, -1, -1, -1 },
- { "messagemode4", -1, -1, -1, -1 },
+ { "messagemode2", -1, -1, -1, -1 }
};
@@ -5979,7 +5977,7 @@ void Item_OwnerDraw_Paint( itemDef_t *item )
item->textalignx, item->textaligny,
item->window.ownerDraw, item->window.ownerDrawFlags,
item->alignment, item->textalignment, item->textvalignment,
- item->special, item->textscale, color,
+ item->special, item->textscale, color, item->window.backColor,
item->window.background, item->textStyle );
}
}
diff --git a/src/ui/ui_shared.h b/src/ui/ui_shared.h
index c42dd241..3a8ee74f 100644
--- a/src/ui/ui_shared.h
+++ b/src/ui/ui_shared.h
@@ -29,7 +29,7 @@ Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
#include "../renderer/tr_types.h"
#include "../client/keycodes.h"
-#include "../../ui/menudef.h"
+#include "../../assets/ui/menudef.h"
#define MAX_MENUNAME 32
#define MAX_ITEMTEXT 64
@@ -379,7 +379,11 @@ typedef struct
void ( *addRefEntityToScene ) ( const refEntity_t *re );
void ( *renderScene ) ( const refdef_t *fd );
void ( *registerFont ) ( const char *pFontname, int pointSize, fontInfo_t *font );
- void ( *ownerDrawItem ) ( float x, float y, float w, float h, float text_x, float text_y, int ownerDraw, int ownerDrawFlags, int align, int textalign, int textvalign, float special, float scale, vec4_t color, qhandle_t shader, int textStyle );
+ void ( *ownerDrawItem ) ( float x, float y, float w, float h, float text_x,
+ float text_y, int ownerDraw, int ownerDrawFlags,
+ int align, int textalign, int textvalign,
+ float special, float scale, vec4_t foreColor,
+ vec4_t backColor, qhandle_t shader, int textStyle );
float ( *getValue ) ( int ownerDraw );
qboolean ( *ownerDrawVisible ) ( int flags );
void ( *runScript )( char **p );