#include "ui/menudef.h"

// team menu
// 
// defines from ui_shared.h

{
	assetGlobalDef {
		cursor      "ui/assets/3_cursor2"         // cursor	
		gradientBar "ui/assets/gradientbar2.tga"  // gradient bar
		fadeClamp   1.0              // sets the fadeup alpha
		fadeCycle   1                // how often fade happens in milliseconds
		fadeAmount  0.1              // amount to adjust alpha per cycle

		shadowX     5                // x amount for shadow offset
		shadowY     5                // y amount for shadow offset
		shadowColor 0.1 0.1 0.1 0.25 // shadow color

		font        "fonts/font"      24 // font
		smallFont   "fonts/smallfont" 16 // font
		bigFont     "fonts/bigfont"   48 // font
	}
	
	//*****AMMO*****//
	
	menuDef {
		name        "Ammo"
		fullScreen  MENU_FALSE
		visible     MENU_TRUE
		rect        100 453 99 36
		
		itemDef {
			name        "ammoIcon"
			decoration
			rect        103 -9 28 28 
			visible     1
			ownerdraw   CG_PLAYER_AMMO_ICON2D
		}
	
		itemDef {
			name          "ammoValue"
			decoration
			rect          28 10 63 12
			visible       1
			textstyle     6
			textscale     .95
			forecolor     1 1 1 1
			ownerdraw     CG_PLAYER_AMMO_VALUE
			addColorRange -999 0 1 0.02 0.02 1
			addColorRange 1 999 1 1 1 1
		}
	}
	
	//*****PLAYER HEALTH*****//
	
	menuDef {
		name        "Player"
		fullScreen  MENU_FALSE
		visible     MENU_TRUE
		rect        292 453 95 36
	
		itemDef {
			name          "healtValue"
			decoration
			rect          -5 0 63 22
			visible       1
			textalign     2
			textstyle     6
			forecolor     1 1 1 1
			textscale     .95
			ownerdraw     CG_PLAYER_HEALTH
			addColorRange -999 25 1 0.02 0.02 1
			addColorRange 26 100 1 0.8 0.02 1       
			addColorRange 101 999 0 0.4 1 1
		}
	}
	
	//*****PLAYER ARMOR*****//
	
	menuDef {
		name        "Armor"
		fullScreen  MENU_FALSE
		visible     MENU_TRUE	
		rect        353 453 95 32
	
		itemDef {
			name          "armorValue"
			decoration
			rect          34 0 63 22
			visible       1
			textstyle     6
			textscale     .95
			textalign     0
			ownerdraw     CG_PLAYER_ARMOR_VALUE 
			addColorRange -999 0 1 1 1 0
			addColorRange 1 100 1 0.8 0.02 1
			addColorRange 101 999 0 0.4 1 1
		}
	}
	
	//*****CLAN ARENA*****//
	
	menuDef {
		name        "caFrame"
		fullScreen  MENU_FALSE
		visible     MENU_TRUE
		rect        255 415 64 48
		ownerdrawflag CG_SHOW_CLAN_ARENA

		//*****CLAN ARENA STILL ALIVE COUNT*****//
		
		itemDef {
			name          "playersleftBackground"
			decoration
			rect          -250 35 102 18
			visible       1
			backcolor     0.8 0.8 0.8 0.2
			style         2
		}
		
		itemDef {
			name          "redClanPlayers"
			decoration
			ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE
			ownerdraw     CG_RED_CLAN_PLYRS  
			rect          -178 50 136 40
			visible       1
			textalign     ITEM_ALIGN_RIGHT
			textscale     .3
			//forecolor     1 0.1 0.1 0.9
			forecolor     1 0.1 0.1 0.9
		}
		
		itemDef {
			name          "blueClanPlayers"
			decoration
			ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_BLUE
			ownerdraw     CG_BLUE_CLAN_PLYRS  
			rect          -230 50 32 16
			visible       1
			textalign     ITEM_ALIGN_RIGHT
			textscale     .3
			forecolor     1 1 1 0.7
		}
		
		itemDef {
			name          "redClanPlayers"
			decoration
			ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED
			ownerdraw     CG_RED_CLAN_PLYRS  
			rect          -230 50 32 16
			visible       1
			textalign     ITEM_ALIGN_RIGHT
			textscale     .3
			forecolor     1 1 1 0.7
		}
		
		itemDef {
			name          "blueClanPlayers"
			decoration
			ownerdrawflag CG_SHOW_IF_PLYR_IS_ON_RED
			ownerdraw     CG_BLUE_CLAN_PLYRS  
			rect          -178 50 136 40
			visible       1
			textalign     ITEM_ALIGN_RIGHT
			textscale     .3
			forecolor     1 0.1 0.1 0.9
		}
		
		itemDef {
			name          "ca_vs"
   			rect          -190 49 136 40
   			visible       1
			textalign     2
			textscale     .3
			forecolor     1 1 1 0.7
			decoration
			text          vs
		}
	}
	
	//*****SCORES TEAM*****//
	
	menuDef {
		name          "scoresFrameTeam"
		rect          580 416 60 60
		fullScreen    MENU_FALSE
		visible       MENU_TRUE
		ownerdrawflag CG_SHOW_ANYTEAMGAME
		
		//*****SCORE BACKGROUNDS*****//

		itemDef {
			name          "backgroundRed1"
			decoration
			rect          -40 32 52 22
			visible       1
			ownerdrawflag CG_SHOW_IF_RED_IS_FIRST_PLACE 
			backcolor     0.8 0.1 0.1 0.6
			style         1
		}
		
		itemDef {
			name          "backgroundBlue1"
			decoration
			rect          10 32 52 22
			visible       1
			ownerdrawflag CG_SHOW_IF_RED_IS_FIRST_PLACE
			backcolor     0.1 0.1 0.8 0.6
			style         1
		}
	
		itemDef {
			name          "backgroundRed2"
			decoration
			rect          10 32 52 22
			visible       1
			ownerdrawflag CG_SHOW_IF_BLUE_IS_FIRST_PLACE
			backcolor     0.8 0.1 0.1 0.6
			style         1
		}
		
		itemDef {
			name          "backgroundBlue2"
			decoration
			rect          -40 32 52 22
			visible       1
			ownerdrawflag CG_SHOW_IF_BLUE_IS_FIRST_PLACE
			backcolor     0.1 0.1 0.8 0.6
			style         1
		}
	
		//*****SCORE VALUES*****//
	
		itemdef {
			name          "scoreRed1"
			decoration
			ownerdraw     CG_RED_SCORE
			ownerdrawflag CG_SHOW_IF_RED_IS_FIRST_PLACE
			rect          -25 30 32 20
			visible       1
			textscale     0.35
			textalign     2
		}
		
		itemdef {
			name          "scoreBlue1"
			decoration
			ownerdraw     CG_BLUE_SCORE
			ownerdrawflag CG_SHOW_IF_RED_IS_FIRST_PLACE
			rect          22 30 32 20
			visible       1
			textscale     0.35
			textalign     2
		}
		
		itemdef {
			name          "scoreRed2"
			decoration
			ownerdraw     CG_RED_SCORE
			ownerdrawflag CG_SHOW_IF_BLUE_IS_FIRST_PLACE
			rect          22 30 32 20
			visible       1
			textscale     0.35
			textalign     2
		}
		
		itemdef {
			name          "scoreBlue2"
			decoration
			ownerdraw     CG_BLUE_SCORE
			ownerdrawflag CG_SHOW_IF_BLUE_IS_FIRST_PLACE
			rect          -25 30 32 20
			visible       1
			textscale     0.35
			textalign     2
		}
	}
	
	//*****SCORE LIMITS*****//

	menuDef {
		name          "scoresFrameLimit"
		rect          580 416 60 60
		fullScreen    MENU_FALSE
		visible       MENU_TRUE
	
		itemDef {
			name          "scoreLimit"
			decoration
			rect          30 64 32 20
			visible       1
			textscale     0.25
			textalign     2
			forecolor     1 1 1 0.5
			ownerdraw     CG_CAPFRAGLIMIT
			ownerdrawflag CG_SHOW_IF_CHAT_VISIBLE
		}
	}
	
	//*****SCORE BORDERS*****//
	
	menuDef {
		name          "bordersteam"
		rect          580 416 60 60
		fullScreen    MENU_FALSE
		visible       MENU_TRUE
		ownerdrawflag CG_SHOW_ANYTEAMGAME
		
		itemDef {
			name "BorderFirst"
			visible 1
			rect -43 30 52 22
			border WINDOW_BORDER_FULL
			bordersize 2
			bordercolor 0.8 0.8 0.8 1
			ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
		}

		itemDef {
			name "BorderSecond"
			visible 1
			rect 8 30 50 22
			border WINDOW_BORDER_FULL
			bordersize 2
			bordercolor 0.8 0.8 0.8 1
			ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE
		} 
	}
	
	//*****SCORES DUEL/FFA*****//
	
	menuDef {
		name          "scoresFrameDuel"
		rect          580 416 60 60
		fullScreen    MENU_FALSE
		visible       MENU_TRUE
		ownerdrawflag CG_SHOW_ANYNONTEAMGAME
		
		//*****SCORE BACKGROUNDS*****//
		
		itemDef {
			name          "background1st"
			decoration
			rect          -30 34 45 20
			visible       1
			ownerdrawflag CG_SHOW_ANYNONTEAMGAME 
			backcolor     0.1 0.1 0.8 0.6
			style         1
		}
		
		itemDef {
			name          "background2nd"
			decoration
			rect          15 34 45 20
			visible       1
			ownerdrawflag CG_SHOW_ANYNONTEAMGAME 
			backcolor     0.8 0.1 0.1 0.6
			style         1
		}
			
		//*****SCORE VALUES*****//

		itemdef {
			name          "myscore"
			decoration
			ownerdraw     CG_PLAYER_SCORE
			ownerdrawflag CG_SHOW_ANYNONTEAMGAME 
			rect          -65 31 120 20
			visible       1
			textscale    .35
		}
	
		itemdef {
			name          "enemyscore1st"
			decoration
			ownerdraw     CG_1STPLACE
			ownerdrawflag CG_SHOW_IF_PLYR_IS_NOT_FIRST_PLACE 
			rect          30 51 120 20
			visible       1
			textscale     .35
		}
		
		itemdef {
			name          "enemyscore2nd"
			decoration
			ownerdraw     CG_2NDPLACE
			ownerdrawflag CG_SHOW_IF_PLYR_IS_FIRST_PLACE
			rect          30 51 120 20
			visible       1
			textscale     .35
		}
	}
	
	//*****CTF FLAG STATUS*****//
	
	menuDef {
		name          "ctfFlags"
		rect          580 416 60 60
		fullScreen    MENU_FALSE
		visible       MENU_TRUE
		ownerdrawflag CG_SHOW_CTF
		
		//*****FLAG STATUS ICON*****//

		itemDef {
			name          "redflag"
			decoration
			rect          -38 34 22 18
			visible       1
			ownerdrawflag CG_SHOW_IF_RED_IS_FIRST_PLACE                      
			ownerdraw     CG_RED_FLAGSTATUS
		}
		
		itemDef {
			name          "blueflag"
			decoration
			rect          14 34 22 18	
			visible       1
			ownerdrawflag CG_SHOW_IF_RED_IS_FIRST_PLACE                   	
			ownerdraw     CG_BLUE_FLAGSTATUS
		}
		
		itemDef {
			name          "redflag"
			decoration
			rect          14 34 22 18
			visible       1
			ownerdrawflag CG_SHOW_IF_BLUE_IS_FIRST_PLACE                      
			ownerdraw     CG_RED_FLAGSTATUS
		}
		
		itemDef {
			name          "blueflag"
			decoration
			rect          -38 34 22 18
			visible       1
			ownerdrawflag CG_SHOW_IF_BLUE_IS_FIRST_PLACE                   	
			ownerdraw     CG_BLUE_FLAGSTATUS
		}
	}
	
	//*****PLAYER PICKUPS*****//

	//*****POWERUP*****//
	//quad, bs, regen ...

	menuDef {
		name       "powerup"
		fullScreen MENU_FALSE
		visible    MENU_TRUE
		rect       565 350 74 156
	
		itemDef {
			name      "powerupArea"
			decoration
			rect      0 0 39 26
			visible   1
			textscale 0.65
			textstyle 3
			ownerdraw CG_AREA_POWERUP
			special   0			// spacing
			align     HUD_VERTICAL
		}
	}
	
	//*****USEABLE PICKUP*****//
	//tele, injection thingy, suicide thingy etc.

	menuDef {
		name       "pickups"
		fullScreen MENU_FALSE
		visible    MENU_TRUE
		rect       20 445 32 64
	
		itemDef {
			name      "playeritem"
			decoration
			rect      440 4 25 25
			visible   1
			ownerdraw CG_PLAYER_ITEM  
		}
	
		itemDef {
			name      "CTFPOWERUP"
			decoration
			rect      475 4 25 25
			visible   1
			ownerdraw CG_CTF_POWERUP
		}
	}
	
	//*****PLAYER HAS ENEMY FLAG ICON*****//
	
	menuDef {
		name       "playerHasFlag"
		fullScreen MENU_FALSE
		visible    MENU_TRUE
		rect       0 346 48 48

		itemDef {
			name      "flag"
			decoration
			rect      237 96 35 35
			visible   1
			style     1
			ownerdraw CG_PLAYER_HASFLAG 
		}
	}
	
	//*****KILL/DEATH MESSAGES*****//
	
	menuDef {
		name       "obit area"
		fullScreen MENU_FALSE
		visible    MENU_TRUE
		rect       6 15 160 32
	
		itemdef {
			name      "hudObit"
			decoration
			ownerdraw CG_PLAYER_OBIT
			rect      0 0 160 32
			visible   1
			textscale .3
		}
	}
	
	//*****CHAT AREA*****//
	
	menuDef {
		name       "chat area"
		fullScreen MENU_FALSE
		visible    MENU_TRUE
		rect       0 0 32 256
	
		itemdef {
			name      "chatWindow"
			decoration
			ownerdraw CG_AREA_NEW_CHAT
			rect      5 300 600 100
			visible   1
		}
	}
	
	//*****GAME TIME*****//
	
	menuDef {
		name       "timerFrame"
		rect       420 160 200 75
		fullScreen MENU_FALSE
		visible    MENU_TRUE
	
		itemDef {
			name      "timerfg"
			decoration
			rect      -20 -32 120 36
			visible   1
			backcolor 0 0.5 1 0.4
			style     1
		}
		itemDef {
			name       "Timer"
			decoration
			textalign  1
			style      0
			rect       0 0 130 50
			visible    1
			textstyle  3
			forecolor  1 1 1 1
			textscale  0.8
			ownerdraw  CG_LEVELTIMER
		}
		itemDef {
			name       "roundTimer"
			decoration
			textalign  0
			style      0
			rect       0 0 130 50
			visible    1
			textstyle  3
			forecolor  1 1 1 1
			textscale  0.50
			ownerdraw  CG_ROUNDTIMER
		}
	}
	
	//*****CUSTOM CROSSHAIRS*****//
	
	menuDef {
		name       "timerFrame"
		rect       304 224 64 36
		fullScreen MENU_FALSE
		visible    MENU_TRUE
		itemdef {
			name          "circle"
			decoration
			cvartest      cg_drawcrosshair
			showCvar      {13}
			rect          -4 -4 40 40
			style         1
			background    "gfx/2d/crosshairj.png"
			visible       1
			backcolor    0.6 0.6 0 1
		}
	}
}
