assemble_image_circle_scene03_1 = {}

assemble_image_circle_scene03_1.params = 
{
	cursor = "gui_cursors_rotation",
	sound_step_angle = math.pi / 6.0, 
	sound_step_time = 200, -- не больше одного раза в заданное время
	sound_rotation = "rotation_ring",
	check_immediately = true
}

assemble_image_circle_scene03_1.Init = function(_owner)
	assemble_image_circle.params = assemble_image_circle_scene03_1.params
	assemble_image_circle.Init(_owner)
	sminigames.SetStandartScriptName(_owner, assemble_image_circle_scene03_1)
	
	assemble_image_circle_scene03_1._middle_ring = _owner.GetWidget("middle_circle", true).get()
	__assert(assemble_image_circle_scene03_1._middle_ring, "Виджет 'middle_circle' не найден в 'assemble_image_circle_scene03_1'")
	assemble_image_circle_scene03_1._UpdateMiddleRing()
end

function assemble_image_circle_scene03_1._UpdateMiddleRing()
	local middle_ring = assemble_image_circle_scene03_1._middle_ring
	if middle_ring then
		__assert(#assemble_image_circle.data.array == 2)
		local angle = -(assemble_image_circle.data.array[1].angle + assemble_image_circle.data.array[2].angle)
		middle_ring.SetRotation(sf.misc.MatrixRotation(angle, middle_ring.GetSize().X / 2, middle_ring.GetSize().Y / 2))
	end
end

function assemble_image_circle_scene03_1.OnUpdate(_owner)
	if assemble_image_circle.OnUpdate then assemble_image_circle(_owner) end
	
	assemble_image_circle_scene03_1._UpdateMiddleRing()
end

for p,v in pairs(assemble_image_circle) do
	if not assemble_image_circle_scene03_1[p] then assemble_image_circle_scene03_1[p] = v end
end
