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

// Defines //
#define WINDOW_X		0
#define WINDOW_Y		0
#define WINDOW_WIDTH	__WINDOW_WIDTH
#define WINDOW_HEIGHT	480
#define GROUP_NAME		"grpHostgameDedicatedWarning"

// Dedicated Server Starting Warning Menu //
menuDef
{
	name		"hostgame_dedicated_warning"
	visible		0
	fullscreen	0
	rect		WINDOW_X WINDOW_Y WINDOW_WIDTH WINDOW_HEIGHT
	style		WINDOW_STYLE_FILLED
	popup

	fadeClamp	0.5

	onOpen
	{
		setitemcolor background backcolor 0 0 0 0 ;
		fadein background
	}

	onESC
	{
		close hostgame_dedicated_warning ;
		open hostgame
	}

// Background //
	itemDef {
		name		"background"
		rect		0 0 WINDOW_WIDTH 480
		style		WINDOW_STYLE_FILLED
		background	"ui/assets/fadebox.tga"
		backcolor	0 0 0 0
		visible		1
		decoration
	}

// Subwindows //
#define SUBWINDOW_WIDTH		256
#define SUBWINDOW_HEIGHT	128
#define SUBWINDOW_X			.5 * (WINDOW_WIDTH - SUBWINDOW_WIDTH)
#define SUBWINDOW_Y			.5 * (WINDOW_HEIGHT - SUBWINDOW_HEIGHT)

	SUBWINDOWBLACK( SUBWINDOW_X, SUBWINDOW_Y, SUBWINDOW_WIDTH, SUBWINDOW_HEIGHT, _("START DEDICATED SERVER") )
	LABEL( SUBWINDOW_X+4, SUBWINDOW_Y+16, (SUBWINDOW_WIDTH)-8, 10, _("Starting a Dedicated Server will"), .2, ITEM_ALIGN_LEFT, 0, 8 )
	LABEL( SUBWINDOW_X+4, SUBWINDOW_Y+28, (SUBWINDOW_WIDTH)-8, 10, _("close the game window and open the"), .2, ITEM_ALIGN_LEFT, 0, 8 )
	LABEL( SUBWINDOW_X+4, SUBWINDOW_Y+40, (SUBWINDOW_WIDTH)-8, 10, _("server console. You can then re-open"), .2, ITEM_ALIGN_LEFT, 0, 8 )
	LABEL( SUBWINDOW_X+4, SUBWINDOW_Y+52, (SUBWINDOW_WIDTH)-8, 10, _("the game and connect to the server."), .2, ITEM_ALIGN_LEFT, 0, 8 )
	LABEL( SUBWINDOW_X+4, SUBWINDOW_Y+76, (SUBWINDOW_WIDTH)-8, 10, _("Are you sure you want to start"), .2, ITEM_ALIGN_LEFT, 0, 8 )
	LABEL( SUBWINDOW_X+4, SUBWINDOW_Y+88, (SUBWINDOW_WIDTH)-8, 10, _("a Dedicated Server?"), .2, ITEM_ALIGN_LEFT, 0, 8 )

	BUTTON( SUBWINDOW_X+6, SUBWINDOW_Y+SUBWINDOW_HEIGHT-24, .5*(SUBWINDOW_WIDTH-18), 18, _("MSGID_MENU_YES"), .3, 14, uiScript startServer )
	BUTTON( SUBWINDOW_X+6+.5*(SUBWINDOW_WIDTH-18)+6, SUBWINDOW_Y+SUBWINDOW_HEIGHT-24, .5*(SUBWINDOW_WIDTH-18), 18, _("MSGID_MENU_NO"), .3, 14, close hostgame_dedicated_warning ; open hostgame )
}
