//=============================================================================
// UnrealMenu
//=============================================================================
class UnrealMenu expands Menu;

#exec TEXTURE IMPORT NAME=IconSkull FILE=TEXTURES\HUD\i_skull.PCX GROUP="Icons"
#exec TEXTURE IMPORT NAME=TranslatorHUD3 FILE=models\TRANHUD3.PCX GROUP="Icons" FLAGS=2

#exec Font Import File=Textures\LrgFont.pcx Name=LargeFont
#exec Font Import File=Textures\TinyFont.pcx Name=TinyFont
#exec Font Import File=Textures\TinyFon3.pcx Name=TinyWhiteFont
#exec Font Import File=Textures\TinyFon2.pcx Name=TinyRedFont

#exec AUDIO IMPORT FILE="Sounds\eightbal\Eload1.WAV" NAME="Loading" GROUP="EightBall"
#exec AUDIO IMPORT FILE="Sounds\eightbal\Select.WAV" NAME="Selecting" GROUP="EightBall"
#exec AUDIO IMPORT FILE="Sounds\automag\cocking.WAV" NAME="Cocking" GROUP="AutoMag"

var(Help)  string[255] HelpMessage[20];

function PlaySelectSound()
{
	if ( Level.NetMode == NM_StandAlone )
		PlaySound(sound'Selecting');
}

function PlayModifySound()
{
	if ( Level.NetMode == NM_StandAlone )
		PlaySound(sound'Cocking');
}

function PlayEnterSound()
{
	if ( Level.NetMode == NM_StandAlone )
		PlaySound(sound'Loading');
}

function DrawMenu(canvas Canvas)
{
	local int StartX, StartY, Spacing;
	
	Spacing = Clamp(0.1 * Canvas.ClipY, 32, 48);
	StartX = Max(40, 0.5 * Canvas.ClipX - 160);
	StartY = Max(4, 0.5 * (Canvas.ClipY - 5 * Spacing - 128));
	Canvas.Font = Font'LargeFont';

	// draw text
	Canvas.SetPos(StartX, StartY );
	Canvas.DrawText("NOT YET IMPLEMENTED", False);

	// Draw help panel
	DrawHelpPanel(Canvas, StartY + 5 * Spacing);
}

function DrawHelpPanel(canvas Canvas, int StartY)
{
	local int StartX;

	if ( Canvas.ClipY < 130 + StartY )
		return;
	else
	{
		StartX = 0.5 * Canvas.ClipX - 128;
		StartY = Canvas.ClipY - 132;
	}

	Canvas.bCenter = false;
	Canvas.Font = Font'MedFont';
	Canvas.Style = 2;	
	Canvas.SetPos(StartX, StartY);
	Canvas.DrawIcon(texture'TranslatorHUD3', 1.0);
	Canvas.SetOrigin(StartX + 18, StartY + 16);
	Canvas.SetClip(225,110);
	Canvas.SetPos(0,0);
	Canvas.Style = 1;	
	if ( Selection < 20 )
		Canvas.DrawText(HelpMessage[Selection], False);	
}

