dofile('data/Scripts/Screens/OKScreen.lua');

function HintDialogChangeCheckboxState(state)
	assert(type(state) == 'boolean');
	assert(check);

	check:SetVisible(state);
end

------------------------------------------------------------------------------
--// auxiliary functions

function CreateGraphics()
--// (!) NOTE: this code is same to the "CreateGraphics" function code in DialogScreen with one little
--// difference - shadow obejct isn't created to prevent shading current scene

	local bg = CreateSprite(); 
	bg:SetName('HintWindow');
	bg:AttachTo(dialogScreen);
	bg:SetSprite('DialogWindowSCTexture');
	bg:SetXY(SCREEN_WIDTH/2.0, SCREEN_HEIGHT/2.0);
	bg:SetZ(0.1);
	bg:SetVisible(true);

	local textTitle = CreateTextEntity('GUICaptionFont', '');
	textTitle:SetName('HintWindowTitle');
    textTitle:AttachTo(bg);
	textTitle:SetXY(0.0, -160.0);
	textTitle:SetZ(0.1);
	textTitle:SetScale(1.2);

	questionText = CreateTextEntity('GUITextFont', '');
	questionText:SetName('QuestionText');
    questionText:AttachTo(bg);
	questionText:SetXY(0.0, -80.0);
	questionText:SetZ(1.0);
	
	dialogScreen.captionText = textTitle;
	dialogScreen.questionText = questionText;

--	CreateWindowShade(bg);
	CreateCheckButton();
end

function CreateCheckButton()
	do
		local button = CreateButton('OptionsModeCheckboxButtonUp','OptionsModeCheckboxButtonOver','OptionsModeCheckboxButtonDown', 
									'MSG_DISABLE_TUTORIAL', dialogScreen);
		button:AttachTo(dialogScreen);
		button:SetXY(SCREEN_WIDTH/2.0 - 80.0, 480.0);
		button:SetZ(1.0);
		button:SetScale(0.7);
		button:SetVisible(true);

		local caption = CreateTextEntity('GUITextFont', 'DISABLE_TUTORIAL');
		caption:SetName('DontShowTutorialText');
		caption:SetTextAlignment(HGETEXT_LEFT);
	    caption:AttachTo(button);
		caption:SetXY(30.0, 10.0);
		caption:SetZ(1.0);
		caption:SetScale(1.1);

		check = CreateSprite(); 
		check:SetName('DontShowTutorialCheck');
		check:AttachTo(button);
		check:SetSprite('OptionsModeCheckboxTexture');
		check:SetXY(0.0, 0.0);
		check:SetZ(0.1);
		check:SetVisible(false);
	end
	do
--		local button = CreateButton('HintScreenButtonUp','HintScreenButtonOver','HintScreenButtonDown', 'MSG_CLICK_ON_SCREEN', dialogScreen);
--		button:AttachTo(dialogScreen);
--		button:SetOpacity(0.1);
--		button:SetXY(0.0, 0.0);
--		button:SetZ(0.0);
--		button:SetScaleX(2.0 * SCREEN_WIDTH);
--		button:SetScaleY(2.0 * SCREEN_HEIGHT);
--		button:SetVisible(true);
	end
end
