PromptHeading = ID_TUTORIAL_2_OFFSET + 1; --"The Three Views"
g_currentprompt = 0;
g_counter = 0;
Tweaks.numyearsin24hours = 0;

-------------------------------------------------------------------------------------------------
-- INITIALISE_Level. Standard level event
-------------------------------------------------------------------------------------------------
function EVENTINITIALISE_Level()
--	Game.Pause();
	-- load the building and business file
	C_RunScript("scripts\\maps\\tempmap.lua");
end;

-------------------------------------------------------------------------------------------------
-- Level. Standard level event.
-------------------------------------------------------------------------------------------------
function EVENT_Level()
	-- create an initial prompt
	C_TriggerEvent("BlockCam", 1, PACIFIC_AVENUE);
	Interface.DisableAllControls();
	Interface.DisableAll3DPicking();
	Interface.DisableCameraControl();
	C_TriggerEvent("SetPlanView", 1);
	-- create the initial prompt
	CreatePrompt(1);
end;

function CATCHEVENT_InterfacePromptDismiss(a)
	CreatePrompt(a);
end;

function CATCHEVENT_TutorialEvent(a)

	if g_currentprompt == 11 then
		Interface.DismissPrompt();
		Interface.DisableControl(TUT_NAVIGATOR_PANEL);
		Interface.DisableControl(TUT_MPP_GREENBUTTON_6);
		Interface.DisableAll3DPicking();
	end;

	if g_currentprompt == 4 then
		Interface.DismissPrompt();
		Interface.DisableControl(TUT_TOGGLE_VIEW);
	end;

end;

function CATCHEVENT_Picked3D(a)

	if g_currentprompt == 11 then
		Interface.DismissPrompt();
		Interface.DisableAll3DPicking();
	end;

	if g_currentprompt == 7 then
		Interface.DismissPrompt();
		Interface.DisableAll3DPicking();
	end;

	if a == 1 and g_currentprompt == 5 then
		Interface.DismissPrompt();
		Interface.DisableAll3DPicking();
	end;

end;

-- prompt manager
function CreatePrompt(a)
	g_currentprompt = a;
	body = a+PromptHeading;
	if a == 1 then
		Interface.CreatePrompt(PromptHeading,body, a+1); --"There are three main views that you need to know about. This is the Strategic View...", a+1);
	elseif a == 2 then
		Interface.CreatePrompt(PromptHeading,body, a+1); --"This is the Block View...", a+1);
		Camera.SetCityView();
		Camera.SetMode(BLOCKCAM, INDIANA_AVENUE);
	elseif a == 3 then
		Interface.CreatePrompt(PromptHeading,body, a+1); --"And this is the Business View...", a+1);
		Camera.SetMode(BUILDINGCAM, 0);
	elseif a == 4 then
		Interface.CreateMessage(PromptHeading,body, a+1); --"Here's how to get to the Strategic View. Click the 'Compass Button'.", a+1);
		Interface.AddArrow( 534, 461 );
		Interface.EnableControl(TUT_TOGGLE_VIEW);
	elseif a == 5 then
		Interface.CreateMessage(PromptHeading,body, a+1); --"Good. We could jump straight back to where we were by clicking the same button again, but we can also double click any of the blocks. Try it on Indiana Avenue.", a+1);
		Interface.PositionPrompt(0, 150);
		Interface.AddArrow( 323, 105 );
		Interface.EnableBlockPicking(INDIANA_AVENUE);
	elseif a == 6 then
		Interface.CreatePrompt(PromptHeading,body, a+1); -- "Great. You now have Indiana Avenue selected. All the information in the panel is about this block.", a+1);
		Interface.PositionPrompt(0, 0);
		Interface.AddArrow(190, 27);
	elseif a == 7 then
		Interface.CreateMessage(PromptHeading,body, a+1); --"With a block selected you can now select any of the buildings on it. Try clicking on one.", a+1);
		Interface.PositionPrompt(0,-100);
		Interface.EnableBuildingPicking();
	elseif a == 8 then
		Interface.CreatePrompt(PromptHeading,body, a+1); --"Good. Now, with a building selected, the panel displays information about the building.", a+1);
		Interface.AddArrow(190, 27);
	elseif a == 9 then
		Interface.CreatePrompt(PromptHeading,body, a+1); --"You can get back to the Block selection in a number of ways. You could click the 'Go To Block button'...", a+1);
		Interface.AddArrow( 29, 288 );
	elseif a == 10 then
		Interface.CreatePrompt(PromptHeading,body, a+1); --"You could select the Block in the Navigator...", a+1);
		Interface.AddArrow( 560, 372);
		g_counter = 0;
	elseif a == 11 then
		Interface.CreateMessage(PromptHeading,body, a+1); --"Or you could click on the pavement of the block. Use one of these methods to go back to the Block View.", a+1);
		Interface.EnableBlockPicking(INDIANA_AVENUE);
		Interface.EnableControl(TUT_NAVIGATOR_PANEL);
		Interface.EnableControl(TUT_MPP_GREENBUTTON_6);
	elseif a == 12 then
		Interface.CreatePrompt(PromptHeading,body, a+1); --"You now know about the three main views.", a+1);
	elseif a == 13 then
		Game.End(true);
	end;
end;


