#include "ui/menudef.h"
#include "ui/menumacros.h"

// Defines //
#define WINDOW_X		16
#define WINDOW_Y		16
#define WINDOW_WIDTH	608
#define WINDOW_HEIGHT	448
#define GROUP_NAME		"grpCreditsQuit"

// Quit Credits Menu //
menuDef {
	name		"credits_quit"
	visible		0
	fullscreen	0
	rect		WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
	style		WINDOW_STYLE_FILLED

	onESC {
		uiScript Quit
	}


// Window //
	itemDef {
		name		"window"
		group		GROUP_NAME
		rect		0 0 WINDOW_WIDTH WINDOW_HEIGHT
		style		WINDOW_STYLE_FILLED
		backcolor	0 0 0 1
		border		WINDOW_BORDER_FULL
		bordercolor	.5 .5 .5 .5
		visible		1
		decoration
	}

// Logo //
//	itemDef {
//		name		"logoShadow"
//		rect		$evalfloat(.5*(WINDOW_WIDTH-200)+1) $evalfloat(80+1) 200 100
//		style		WINDOW_STYLE_SHADER
//		background	"ui/assets/etl_logo"
//		forecolor	0 0 0 1
//		visible		1
//		decoration
//	}

	itemDef {
		name		"logo"
		rect		$evalfloat(.5*(WINDOW_WIDTH-200)-1) $evalfloat(56-1) 200 100
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/etl_logo"
		forecolor	1 1 1 1
		visible		1
		decoration
	}

	itemDef {
		name		"headerLogo"
		group		GROUP_NAME
		rect		6 152 $evalfloat(WINDOW_WIDTH-12) 16
		text		_("DEVELOPED BY ET: LEGACY TEAM")
		textfont	UI_FONT_ARIBLK_16
		textstyle	ITEM_TEXTSTYLE_SHADOWED
		textscale	.3
		textalign	ITEM_ALIGN_CENTER
		textalignx	$evalfloat(.5*(WINDOW_WIDTH-12))
		textaligny	14
		forecolor	1 1 1 1
		visible		1
		decoration
	}

// Credits Sections //
#define CREDITS_Y	108

	//LABELWHITE( 6, CREDITS_Y+72, .5*(WINDOW_WIDTH-24), 10, "Let's keep ET alive!", .2, ITEM_ALIGN_CENTER, .5*(WINDOW_WIDTH-24), 8 )

// Original Developers //
	itemDef {
		name		"headerDevelopers"
		group		GROUP_NAME
		rect		6 $evalfloat(CREDITS_Y+88) $evalfloat(WINDOW_WIDTH-12) 12
		text		_("^1ORIGINAL DEVELOPERS")
		textfont	UI_FONT_ARIBLK_16
		textstyle	ITEM_TEXTSTYLE_SHADOWED
		textscale	.19
		textalign	ITEM_ALIGN_CENTER
		textalignx	$evalfloat(.5*(WINDOW_WIDTH-12))
		textaligny	10
		forecolor	1 1 1 1
		visible		1
		decoration
	}

// Logo //
#define LOGOMAIN_WIDTH 64+16+64+16+144
#define LOGOBAR_WIDTH 96+16+96+16+64+16+64

	itemDef {
		name		"logoSDShadow"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOMAIN_WIDTH))+1) $evalfloat(200+8+8+1) 64 64
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_sd"
		forecolor	0 0 0 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoSD"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOMAIN_WIDTH))+1) $evalfloat(200+8+8+1) 64 64
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_sd"
		forecolor	1 1 1 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoiDShadow"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOMAIN_WIDTH))+64+16+1) $evalfloat(200+8+8+1) 64 64
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_id"
		forecolor	0 0 0 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoiD"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOMAIN_WIDTH))+64+16+1) $evalfloat(200+8+8+1) 64 64
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_id"
		forecolor	1 1 1 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoAtviShadow"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOMAIN_WIDTH))+64+16+64+16+1) $evalfloat(214+8+8+1) 144 36
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_atvi"
		forecolor	0 0 0 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoAtvi"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOMAIN_WIDTH))+64+16+64+16+1) $evalfloat(214+8+8+1) 144 36
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_atvi"
		forecolor	1 1 1 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoGMShadow"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOBAR_WIDTH))+1) $evalfloat(272+8+8+1) 96 48
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_gm"
		forecolor	0 0 0 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoGM"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOBAR_WIDTH))-1) $evalfloat(272+8+8-1) 96 48
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_gm"
		forecolor	1 1 1 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoNerveShadow"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOBAR_WIDTH))+96+16+1) $evalfloat(272+8+20+1) 96 24
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_nerve"
		forecolor	0 0 0 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoNerve"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOBAR_WIDTH))+96+16-1) $evalfloat(272+8+20-1) 96 24
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_nerve"
		forecolor	1 1 1 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoOSPShadow"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOBAR_WIDTH))+96+16+96+16+1) $evalfloat(272+8+1) 64 64
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_osp"
		forecolor	0 0 0 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoOSP"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOBAR_WIDTH))+96+16+96+16-1) $evalfloat(272+8-1) 64 64
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_osp"
		forecolor	1 1 1 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoETProShadow"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOBAR_WIDTH))+96+16+96+16+64+16+1) $evalfloat(272+8+1) 64 64
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_etpro"
		forecolor	0 0 0 1
		visible		1
		decoration
	}

	itemDef {
		name		"logoETPro"
		rect		$evalfloat(.5*(WINDOW_WIDTH-(LOGOBAR_WIDTH))+96+16+96+16+64+16-1) $evalfloat(272+8-1) 64 64
		style		WINDOW_STYLE_SHADER
		background	"ui/assets/logo_etpro"
		forecolor	1 1 1 1
		visible		1
		decoration
	}


// Website //
	itemDef {
		name		"headerWebsite"
		group		GROUP_NAME
		rect		6 $evalfloat(CREDITS_Y+252) $evalfloat(WINDOW_WIDTH-12) 12
		text		_("^1WEBSITE")
		textfont	UI_FONT_ARIBLK_16
		textstyle	ITEM_TEXTSTYLE_SHADOWED
		textscale	.19
		textalign	ITEM_ALIGN_CENTER
		textalignx	$evalfloat(.5*(WINDOW_WIDTH-12))
		textaligny	10
		forecolor	1 1 1 1
		visible		1
		decoration
	}

	LABELWHITE( 6, CREDITS_Y+264, .5*(WINDOW_WIDTH-12), 10, "www.etlegacy.com", .2, ITEM_ALIGN_CENTER, .5*(WINDOW_WIDTH-12), 8 )


// Copyright Notices //
	LABEL( 6, CREDITS_Y+290, WINDOW_WIDTH-12, 10, _("© 2012-2019 ET:Legacy Team - under the terms of GPL version 3."), .15, ITEM_ALIGN_LEFT, 0, 8 )
	LABEL( 6, CREDITS_Y+300, WINDOW_WIDTH-12, 10, _("© 2003 Id Software, Inc. All rights reserved. Wolfenstein: Enemy Territory, Return to Castle Wolfenstein, the Return to Castle Wolfenstein logo, the id Software name, and the id logo are either registered trademarks or trademarks of Id Software, Inc. in the United States and/or other countries. All other trademarks and trade names are the properties of their respective owners."), .15, ITEM_ALIGN_LEFT, 0, 8 )

// Buttons //
	itemDef {
		name		"quitButton"
		group		GROUP_NAME
		rect		0 0 WINDOW_WIDTH WINDOW_HEIGHT
		type		ITEM_TYPE_BUTTON
		style		WINDOW_STYLE_EMPTY
		visible		1

		action {
			uiScript quit
		}
	}
}
