-- Function to create the HUD window

-- For the Timer
-- Make sure the window and timer area are large enough to display the text
TimerFont = "fonts/current.mvec";
TimerColor  = Color(255,255,255,255);
TimerFontInfos = {
  TimerFont,
  25, -- Taille
  TimerColor
};

-- For the Score
-- Make sure the window and score area are large enough to display the text
ScoreFont = "fonts/current.mvec";
ScoreColor = Color(0,0,0,255);
ScoreFontInfos = {
  TimerFont,
  25, -- Taille
  ScoreColor
};

-- For the Money
-- Make sure the window and score area are large enough to display the text
MoneyFont = "fonts/current.mvec";
MoneyColor = Color(73,79,11,255);
MoneyFontInfos = {
  MoneyFont,
  22, -- Taille
  MoneyColor
};

function GetHUDMapFile() 

	if( IsTimedMode() ) then
		return "screens/global/hud_map.png"
	else
		return "screens/global/hud_map_casual.png"
	end
	

end


function DoHUDMapWindow(background, timerX, timerY, scoreX, scoreY, listX, listY)
	return Bitmap {
			
			
		name="backgroundimage",
		image=background,
		
		x=0,
		y=0,
		w=277,
		h=768,
	
		HUDMapWindow {
	
		-- Name the window
		name="hudmapwindow",
	
		x=0,
		y=0,
		w=277,
		h=768,
		
		
		Timer {
			name = "timer",
			x = timerX, -- absolute position into the window
			y = timerY,
			w = 75, -- adequate for arial font
			h = 25,

			Text {
				name = "timertext",
				x = 0,
				y = 0,
				w = 75,
				h = 25,
				font = TimerFontInfos,
			}
		},
		
		Text{
			name = "money",
			rotation = 4,
			x = 74,
			y = 152,
			w = 100,
			h = 25,
			font = MoneyFontInfos,
		},
		
		Text {
			name = "objects",
			flags = kVAlignCenter+kHAlignCenter,
			rotation = -4,
			x = listX + 40,
			y = listY + 20,
			w = 120,
			h = 100
		},
		
		Text{
			name = "mission",
			x = listX+37,
			y = listY + 252,
			w = 180,
			h = 350,
		},
		
		SetStyle( MenuButtonStyle ),

		Button
		{
			x=0,
			y=657,
			w=100,
			name="options",
			MenuButtonLabel("options"),
			type = kPush,
			mask = "screens/global/hud_bouton02_mask.png",
			graphics = {
				"screens/global/hud_bouton02.png",
				"screens/global/hud_bouton02_on.png",
				"screens/global/hud_bouton02.png"
			},
		},

		Button
		{
			x=0,
			y=708,
			w=120,
			name="menu",
			MenuButtonLabel("menu"),
			type = kPush,
			mask = "screens/global/hud_bouton02_mask.png",
			graphics = {
				"screens/global/hud_bouton01.png",
				"screens/global/hud_bouton01_on.png",
				"screens/global/hud_bouton01.png"
			},
		},
		},
	};
end