function OnSceneLoad(screen)
    game_state = {}
    LoadData(screen)    
    local pf = play_field
    local level = pf:GetLevelScreen()
    game_state.custom_cursors = {}
    game_state.locked_objects = {}
    game_state.active_objects = {}
    game_state.locker = ReferenceCounter()
    game_state.active_zone = nil
	
	game_state.custom_cursors = {}
	--game_state.custom_cursors['showcase']='CursorZoom'
    --game_state.locked_objects['showcase'] = true	
	
                                         
    pf:GetObject('showcase'):SetOpacity(0);    
    
    game_state.tools = {}	
	
	game_state.meta_object = 'cigar4'
	
	local waterEffect = WaterEffectComposition()
	waterEffect:Play()
	waterEffect:AttachTo(screen)	
	waterEffect:SetZ(150)	
end

function OnNotebookOpened()
    --OnSceneStateChanged(play_field)
end


function OnScreenShown()
end

function OnSceneFree()    
    FreeData()
end

function OnUpdate(dt)    
end

function OnExit()
end

function OnObjectMouseEnter(object)
    DefaultOnObjectMouseEnter(object);
	local obj_name = object:GetName()
	
	if obj_name == 'lamp1' then
		play_field:GetObject('light1'):Show()
	end
	if obj_name == 'lamp2' then
		play_field:GetObject('light2'):Show()
	end
	if obj_name == 'lamp3' then
		play_field:GetObject('light3'):Show()
	end
end

function OnObjectMouseLeave(object)
    DefaultOnObjectMouseLeave(object)
	play_field:GetObject('light1'):Hide()
	play_field:GetObject('light2'):Hide()
	play_field:GetObject('light3'):Hide()
end

function OnObjectMouseDown(object)
    obj_name = object:GetName()
    local pf = play_field
    local is_wrong_click = true
    
    is_wrong_click = DefaultOnObjectMouseDown(object)
    
    if not is_wrong_click then
        play_field:ResetWrongClicksCount();
    end
    
    return is_wrong_click;
end

function OnObjectMouseUp(object)
end

function OnObjectWillBeFound(object)
    
end

function OnToolFound(tool)
end

function OnToolApply(tool, object)
    DefaultOnToolApply(tool, object)
end

function OnObjectReachPanel(object)
end

function OnPhotographing(phone_screen_center_pos)
end

function OnMouseMove(previous_pos, current_pos)
end

function OnSetTool(tool)
end

function CanBeHinted(obj)
    if locked_object[obj] ~= true then
        return true
    else
        return false
    end
end

function OnLostFocus()
end

function OnGainFocus()
end

function OnMinigameCompleted()
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/Scenes/1_museum_gallery_1/Layers/bg.jpg',0,0,1024,768,1,0)
	anim:SetHotSpot(512,384)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bg',anim,512,384,1,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Zoom/bg.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('bg_zoom',anim,512,384,300,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/showcase.png',0,0,140,66,1,0)
	anim:SetHotSpot(70,33)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('showcase',anim,833,657,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Animations/light.png',0,0,940,220,9,9)
	anim:SetHotSpot(470,110)
	anim:SetBlendMode(2)
	anim:SetColor('0x8FFFFFFF')
	screen:CreateObject('light',anim,549,106,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/grate.png',0,0,743,218,9,9)
	anim:SetHotSpot(371,109)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('grate',anim,506,109,102,0,1,1)
	local anim = CreateAnimation('data/Texture/Comics/Sheriff.dds',0,0,530,636,1,0)
	anim:SetHotSpot(266,256)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('Sheriff',anim,505,390,400,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,512,384,401,0,128,96)
	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('pixel2',anim,512,384,401,0,128,96)
	local anim = CreateAnimation('data/Texture/Effect/particles.png',0,32,32,32,1,0)
	anim:SetHotSpot(16,16)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('particle',anim,100,384,100,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('0x01FFFFFF')
	screen:CreateObject('active_pixel',anim,647,488,100,0,10,10)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Zoom_2/bg_storage.jpg',0,0,640,480,1,0)
	anim:SetHotSpot(320,240)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('bg_storage',anim,512,384,1500,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Zoom_2/screw.png',0,0,26,24,1,0)
	anim:SetHotSpot(13,12)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('screw_storage',anim,400,546,1510,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Zoom_2/pipe.png',0,0,50,80,1,0)
	anim:SetHotSpot(25,40)
	anim:SetBlendMode(2)
	anim:SetColor('0x00FFFFFF')
	screen:CreateObject('pipe_storage',anim,597,268,1505,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('0x01FFFFFF')
	screen:CreateObject('ribbon_active_zone',anim,647,509,104,0,15,7)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/axe.png',0,0,70,90,1,0)
	anim:SetHotSpot(35,45)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('axe',anim,564,591,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/bell.png',0,0,33,40,1,0)
	anim:SetHotSpot(16,20)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bell',anim,432,747,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/butterfly.png',0,0,47,62,1,0)
	anim:SetHotSpot(23,31)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('butterfly',anim,521,649,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/candle.png',0,0,45,88,1,0)
	anim:SetHotSpot(22,44)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('candle',anim,247,546,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/clown.png',0,0,56,85,1,0)
	anim:SetHotSpot(28,42)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('clown',anim,267,625,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/glasses.png',0,0,59,22,1,0)
	anim:SetHotSpot(29,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('glasses',anim,647,330,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/horseshoe.png',0,0,58,42,1,0)
	anim:SetHotSpot(29,21)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('horseshoe',anim,622,738,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/key.png',0,0,56,24,1,0)
	anim:SetHotSpot(28,12)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('key',anim,331,727,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/necklace.png',0,0,38,120,1,0)
	anim:SetHotSpot(19,60)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('necklace',anim,857,67,101,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/phone.png',0,0,53,38,1,0)
	anim:SetHotSpot(26,19)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('phone',anim,419,535,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/rope.png',0,0,72,104,1,0)
	anim:SetHotSpot(36,52)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('rope',anim,319,66,110,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/crown.png',0,0,54,68,1,0)
	anim:SetHotSpot(27,34)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('crown',anim,243,458,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/scissors.png',0,0,37,59,1,0)
	anim:SetHotSpot(18,29)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('scissors1',anim,979,625,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/fan.png',0,0,62,37,1,0)
	anim:SetHotSpot(31,18)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('fan',anim,216,576,101,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/pullverizer.png',0,0,24,61,1,0)
	anim:SetHotSpot(12,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pullverizer1',anim,732,323,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/pullverizer.png',0,0,24,61,1,0)
	anim:SetHotSpot(12,30)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('pullverizer',anim,733,322,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/hourglass.png',0,0,40,66,1,0)
	anim:SetHotSpot(20,33)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('hourglass',anim,349,655,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/microscope.png',0,0,63,107,1,0)
	anim:SetHotSpot(31,53)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('microscope',anim,265,713,109,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/dagger.png',0,0,34,110,1,0)
	anim:SetHotSpot(17,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dagger',anim,975,356,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/laer scissors.png',0,0,18,30,1,0)
	anim:SetHotSpot(9,15)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('laer scissors',anim,980,625,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/laer fan.png',0,0,6,13,1,0)
	anim:SetHotSpot(3,6)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('laer fan',anim,222,584,107,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/laer key.png',0,0,23,11,1,0)
	anim:SetHotSpot(11,5)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('laer key',anim,353,737,106,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/laer necklace.png',0,0,23,22,1,0)
	anim:SetHotSpot(11,11)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('laer necklace',anim,852,15,115,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/laer phone.png',0,0,52,16,1,0)
	anim:SetHotSpot(26,8)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('laer phone',anim,422,531,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/laer rope.png',0,0,51,51,1,0)
	anim:SetHotSpot(25,25)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('laer rope',anim,331,31,120,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('0x01FFFFFF')
	screen:CreateObject('lamp1',anim,943,66,100,0,5,5)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('lamp2',anim,820,105,100,0,5,5)
	local anim = CreateAnimation('data/Texture/Scenes/Common/pixel.jpg',0,0,8,8,1,0)
	anim:SetHotSpot(4,4)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('lamp3',anim,800,141,100,0,5,2)
	local anim = CreateAnimation('data/Texture/Scenes/Common/radial_glow.png',0,0,97,99,1,0)
	anim:SetHotSpot(48,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('light1',anim,942,65,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/radial_glow.png',0,0,97,99,1,0)
	anim:SetHotSpot(48,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('light2',anim,817,103,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/Common/radial_glow.png',0,0,97,99,1,0)
	anim:SetHotSpot(48,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('light3',anim,791,139,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/ribbon1.png',0,0,142,96,1,0)
	anim:SetHotSpot(71,48)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('ribbon1',anim,646,527,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/plate.png',0,0,58,80,1,0)
	anim:SetHotSpot(29,40)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('plate',anim,694,715,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/dust.png',0,0,171,99,1,0)
	anim:SetHotSpot(85,49)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('dust',anim,837,659,104,0,1,1)
	local anim = CreateAnimation('data/Texture/GUI/Panel/Panel.png',0,0,223,664,1,0)
	anim:SetHotSpot(111,332)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('Panel',anim,97,392,0,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/bucket.png',0,0,82,101,1,0)
	anim:SetHotSpot(41,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bucket',anim,239,716,100,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/vedro layer.png',0,0,55,111,1,0)
	anim:SetHotSpot(27,55)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('vedro layer',anim,212,707,120,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Items/bucket.png',0,0,82,101,1,0)
	anim:SetHotSpot(41,50)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('bucket_scaled',anim,241,717,100,0,0.8,0.8)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/cigar4.png',0,0,80,103,1,0)
	anim:SetHotSpot(40,51)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('cigar4',anim,184,657,126,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/skat.png',0,0,533,189,1,0)
	anim:SetHotSpot(266,94)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skat',anim,367,129,109,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/podsvechnik layer.png',0,0,21,18,1,0)
	anim:SetHotSpot(10,9)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('podsvechnik layer',anim,280,494,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/telefon layer.png',0,0,35,52,1,0)
	anim:SetHotSpot(17,26)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('telefon layer',anim,392,532,105,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/skel.png',0,0,295,238,1,0)
	anim:SetHotSpot(147,119)
	anim:SetBlendMode(2)
	anim:SetColor('0xFFFFFFFF')
	screen:CreateObject('skel',anim,678,229,109,0,1,1)
	local anim = CreateAnimation('data/Texture/Scenes/1_museum_gallery_1/Layers/door_zone.png',0,0,64,203,1,0)
	anim:SetHotSpot(32,101)
	anim:SetBlendMode(2)
	anim:SetColor('0x01FFFFFF')
	screen:CreateObject('active_pixel_storage',anim,301,492,100,0,1,1)
end

function FreeData(screen)
end
-- CLEAR_ON_SAVE_END
