function OnSceneLoad(screen)    
    dialogok = screen
    
    game_state = {}    
    game_state.active_object = nil
    
    game_state.polar_coords = {}
	game_state.polar_coords.radius = 0
	game_state.polar_coords.angle = 0
    
    LoadData(screen)
    
    game_state.custom_cursors = {}
    game_state.locked_objects = {}
    --level:AddTaskSafe(CreateTask('', '', ''))
    --zone = CreateZoomZone('')
    game_state.locker = ReferenceCounter()
    game_state.active_zone = nil
    screen:SetLayer(100)
    
    local all_objects = CreateAutoRegisterEntity()
    dialogok:GetObject("BigWindow"):AttachTo(all_objects)    
	all_objects:SetZ(-200.0);
		
	InitDialogWheels(screen)
	InitButtons(screen)	
	
	PostLoad()
end

function OnButtonMouseEnter(title)
end

function OnButtonMouseLeave(title)
end

function OnScreenShown()
end

function PostLoad()
end

function GetWindow()
    return dialogok:GetObject('BigWindow');
end

function InitButtons(screen)
    local up = screen:GetObject("buttonbigup"):GetAnimationPtr()
	local over = screen:GetObject("buttonbigover"):GetAnimationPtr()	
	local down = screen:GetObject("buttonbigdown"):GetAnimationPtr()	
	game_state.ok_button = CreateButton(up, over, down, "Resume", screen)
	game_state.ok_button:AttachTo(screen)
	game_state.ok_button:SetXY(523, 414)
	game_state.ok_button:SetZ(140)
end

function OnSceneFree(screen)
    FreeData(screen)
end

function OnUpdate(dt)
end

function UpdateSound()
end

function UpdateMusic()
end

--[[function OnAllItemsFound()
end]]

function OnExit()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object)
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
end

function OnObjectMouseDown(object)        
end

function OnObjectMouseUp(object)    	
end

function OnToolFound(tool)
end

function OnToolApply(tool, object)    
end

function OnObjectReachPanel(object)
end

function OnButtonPress(title)    
    DefaultOnButtonPress(title)
	if title == "Resume" then		
		dialogok:ScreenDestroy()		
	end
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
end

function OnObjectRightMouseDown(object)
end

function CanBeHinted(obj)    
end

-- CLEAR_ON_SAVE_BEGIN
-- Do not edit code listed below (generated by the editor on each save)
function LoadData(screen)
	local anim = CreateAnimation('data/Texture/GUI/Options/front.png',0,0,597,186,1,0)
	anim:SetHotSpot(298,93)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('front',anim,524,472,136,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pixel',anim,592,327,137,0,5,5)
	local anim = CreateAnimation('data/Texture/GUI/Options/buttonbig.png',0,0,166,70,1,0)
	anim:SetHotSpot(83,35)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonbigup',anim,870,113,140,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Options/buttonbig.png',0,70,166,70,1,0)
	anim:SetHotSpot(83,35)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonbigover',anim,864,159,100,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Options/buttonbig.png',0,140,166,70,1,0)
	anim:SetHotSpot(83,35)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonbigdown',anim,858,221,100,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Dialog/yes.png',0,0,88,72,1,0)
	anim:SetHotSpot(44,36)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonleftup',anim,522,48,100,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Dialog/yes.png',0,72,88,72,1,0)
	anim:SetHotSpot(44,36)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonleftover',anim,530,88,101,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Dialog/yes.png',0,144,88,72,1,0)
	anim:SetHotSpot(44,36)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonleftdown',anim,529,139,100,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Dialog/no.png',0,0,86,68,1,0)
	anim:SetHotSpot(43,34)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonrightup',anim,866,51,100,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Dialog/no.png',0,68,86,68,1,0)
	anim:SetHotSpot(43,34)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonrightover',anim,860,109,100,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Dialog/no.png',0,136,86,68,1,0)
	anim:SetHotSpot(43,34)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('buttonrightdown',anim,856,167,100,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Options/strelka.png',0,0,62,153,1,0)
	anim:SetHotSpot(26,116)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('strelka',anim,521,466,134,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Window/BigWindow.png',0,0,582,516,1,0)
	anim:SetHotSpot(291,258)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('BigWindow',anim,525,291,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Logo/BFGSmallLogo.png',0,0,150,125,1,0)
	anim:SetHotSpot(75,62)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('DistrLogo',anim,910,104,100,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/LogoMini.png',0,0,436,407,1,0)
	anim:SetHotSpot(218,203)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('LogoMini',anim,531,220,100,0,0.5,0.5)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
