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

// Defines //
#define WINDOW_X		16
#define WINDOW_Y		16
#define WINDOW_WIDTH	608
#define WINDOW_HEIGHT	456
#define GROUP_NAME		"grpHostGameExtended"

// Host Game More Menu //
menuDef {
	name		"hostgame_extended"
	visible		0
	fullscreen	0
	rect		WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
	style		WINDOW_STYLE_FILLED

	onEsc {
		close hostgame_extended ;
		open hostgame_advanced
	}

// Window //
	WINDOW( _("HOST GAME: EXTENDED"), 90)

// Subwindows //
#define SUBWINDOW_WIDTH		.5*(WINDOW_WIDTH-18)

// Misc //
#define MISC_Y 32
	SUBWINDOW( 6, MISC_Y, (SUBWINDOW_WIDTH), 30, _("MISC") )
	MULTI( 8, MISC_Y+16, (SUBWINDOW_WIDTH)-4, 10, _("Country Flags:"), .2, 8, "g_countryflags", cvarFloatList { "No" 0 "Yes" 1 }, _("Enable country flags on the server") )

// Download //
#define DOWNLOAD_Y 68
	SUBWINDOW( 6, DOWNLOAD_Y, (SUBWINDOW_WIDTH), 66, _("DOWNLOAD") )
	YESNO( 8, DOWNLOAD_Y+16, (SUBWINDOW_WIDTH)-4, 10, _("Client Downloads:"), .2, 8, "sv_allowDownload", _("Allows players to download missing files from the server") )
	NUMERICFIELD( 8, DOWNLOAD_Y+28, (SUBWINDOW_WIDTH)-4, 10, _("Maximum Download Rate:"), .2, 8, "sv_dl_maxRate", 6, _("Specifies the maximum download rate from the server for players with missing files") )
	YESNO( 8, DOWNLOAD_Y+40, (SUBWINDOW_WIDTH)-4, 10, _("FTP/HTTP Redirects:"), .2, 8, "sv_wwwDownload", _("Redirects players with missing files to another server") )
	EDITFIELD( 8, DOWNLOAD_Y+52, (SUBWINDOW_WIDTH)-4, 10, _("Base URL:"), .2, 8, "sv_wwwDaveUrl", 64, 18, _("Used to build the URL given to clients for download") )
	
// Buttons //
	BUTTON( 6, WINDOW_HEIGHT-24, .33*(WINDOW_WIDTH-24), 18, _("BACK"), .3, 14, close hostgame_extended ; open hostgame )
	BUTTON( 6+.33*(WINDOW_WIDTH-24)+6, WINDOW_HEIGHT-24, .34*(WINDOW_WIDTH-24), 18, _("ADVANCED"), .3, 14, close hostgame_extended ; open hostgame_advanced )
	BUTTON( 6+.33*(WINDOW_WIDTH-24)+6+.34*(WINDOW_WIDTH-24)+6, WINDOW_HEIGHT-24, .33*(WINDOW_WIDTH-24), 18, _("DEFAULT"), .3, 14, open hostgame_advanced_default )
}
