-- 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 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 GetHUDFile() 

	if( IsTimedMode() ) then
		if (IsDiffMode()) then
			return "screens/global/hudho_find.png"
		else
			return "screens/global/hudho.png"
		end
	else
		if (IsDiffMode()) then
			return "screens/global/hudcasual_find.png"
		else
			return "screens/global/hudho_casual.png"
		end
	end
	

end


function DoHUDWindow(background, timerX, timerY, scoreX, scoreY, listX, listY)
	return Bitmap {
	
		name="backgroundimage",
		image=background,
		
		HUDWindow {
	
			-- Name the window
			name="hudwindow",
	
			x=0,
			y=0,
			w=1024,
			h=768,
		
			 --Power button : female intuition
			PowerButtonRed {
				x=11,
				y=149,
				name="powFemaleIntui",
			
				graphics = {
					"screens/global/femaleintuitionbutton/po_Intuition_Off.png",
					"screens/global/femaleintuitionbutton/po_Intuition_Click.png",
					"screens/global/femaleintuitionbutton/po_Intuition_Off.png",
				},
			
				animation = {
					"screens/global/femaleintuitionbutton/po_Intuition_gris.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_01.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_02.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_03.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_04.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_05.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_06.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_07.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_08.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_09.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_010.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_011.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_012.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_013.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_014.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_015.png",
					"screens/global/femaleintuitionbutton/po_Intuition_On_016.png",
				},
			},
	
			-- Power button : fashion sense
			PowerButtonBlue {
				x=64,
				y=129,
				name="powFashionSense",
				
				graphics = {
					"screens/global/savvyfashionsensebutton/po_Sense_Off.png",
					"screens/global/savvyfashionsensebutton/po_Sense_Click.png",
					"screens/global/savvyfashionsensebutton/po_Sense_Off.png",
				},
				
				animation = {
					"screens/global/savvyfashionsensebutton/po_Sense_gris.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_01.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_02.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_03.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_04.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_05.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_06.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_07.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_08.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_09.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_010.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_011.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_012.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_013.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_014.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_015.png",
					"screens/global/savvyfashionsensebutton/po_Sense_On_016.png",
				},			
			},
		
		
			-- Power button : night vision binoculars
			PowerButtonGreen {
				x=136,
				y=149,
				name="powNightVision",
				
				graphics = {
					"screens/global/nightvisionbutton/po_Binocular_Off.png",
					"screens/global/nightvisionbutton/po_Binocular_Click.png",
					"screens/global/nightvisionbutton/po_Binocular_Off.png",
				},
				
				animation = {
					"screens/global/nightvisionbutton/po_Binocular_gris.png",
					"screens/global/nightvisionbutton/po_Binocular_On_01.png",
					"screens/global/nightvisionbutton/po_Binocular_On_02.png",
					"screens/global/nightvisionbutton/po_Binocular_On_03.png",
					"screens/global/nightvisionbutton/po_Binocular_On_04.png",
					"screens/global/nightvisionbutton/po_Binocular_On_05.png",
					"screens/global/nightvisionbutton/po_Binocular_On_06.png",
					"screens/global/nightvisionbutton/po_Binocular_On_07.png",
					"screens/global/nightvisionbutton/po_Binocular_On_08.png",
					"screens/global/nightvisionbutton/po_Binocular_On_09.png",
					"screens/global/nightvisionbutton/po_Binocular_On_010.png",
					"screens/global/nightvisionbutton/po_Binocular_On_011.png",
					"screens/global/nightvisionbutton/po_Binocular_On_012.png",
					"screens/global/nightvisionbutton/po_Binocular_On_013.png",
					"screens/global/nightvisionbutton/po_Binocular_On_014.png",
					"screens/global/nightvisionbutton/po_Binocular_On_015.png",
					"screens/global/nightvisionbutton/po_Binocular_On_016.png",
				},
			},
	
		
			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",
				x = 74,
				y = 88,
				w = 100,
				h = 25,
				font = MoneyFontInfos,
			},
		
			HiddenObjectList {
				name = "list",
				x = listX,
				y = listY - 10,
				w = 200,
				h = 410
			},
		
			PhotoObjectList {
				name = "photolist",
				x = listX,
				y = listY - 10,
				w = 200,
				h = 600
			},
		
			Bitmap {
				x = listX + 80,
				y = listY + 100,
				name="imageS",
			},
		
			SetStyle( MenuButtonStyle ),
	
			Button
			{
				x=0,
				y=657,
				name="map",
				MenuButtonLabelOff("map"),
				type = kPush,
				mask = "screens/global/hud_bouton02_mask.png",
				graphics = {
					"screens/global/hud_bouton_gris02.png",
					"screens/global/hud_bouton_gris02.png",
					"screens/global/hud_bouton_gris02.png"
				},
			},
	
			Button
			{
				x=0,
				y=657,
				name="map",
				MenuButtonLabel("map"),
				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,
				name="menu",
				MenuButtonLabel("menu"),
				type = kPush,
				mask = "screens/global/hud_bouton01_mask.png",
				graphics = {
					"screens/global/hud_bouton01.png",
					"screens/global/hud_bouton01_on.png",
					"screens/global/hud_bouton01.png"
				},
			},
			
		},
	};
end