over_scene_effect_widget = {}

__inherite(over_scene_effect_widget, null_lua_widget_handler())

function over_scene_effect_widget.__CreateInstance()
    return "over_scene_effect_widget"
end

function over_scene_effect_widget.DoDraw(_this, _renderer)
	local self = over_scene_effect_widget
	
	self._effect_list:PreDraw(_renderer)
	self._effect_list:PostDraw(_renderer)
	
	if self._scene then self._scene.Draw(_renderer) end
	if self._amulet_apply_clip then self._amulet_apply_clip.Draw(_renderer) end
	return false
end

function over_scene_effect_widget.DoUpdate(_this)
	over_scene_effect_widget._effect_list:Update()
	if over_scene_effect_widget._scene then over_scene_effect_widget._scene.Update() end
	return true
end

function over_scene_effect_widget.OnMouseDown(_this, _pos, _button, _state, _broadcast)
	if not _broadcast and _pos.Y < 676 and not quest.global_minigame_opened then
		--
	end
	return false
end

function over_scene_effect_widget.SetAmuletApplyEffectClip(_clip)
	over_scene_effect_widget._amulet_apply_clip = _clip
end

function over_scene_effect_widget.Load(_this, _info, _templates)
	over_scene_effect_widget._effect_list = visual_effects.CreateEffectsList()
	return true
end

function over_scene_effect_widget.AddEffect(_id, _pos)
	return over_scene_effect_widget._effect_list:CreateInstantEffect(_id, _pos)
end

function over_scene_effect_widget.SetScene(_scene)
	over_scene_effect_widget._scene = _scene
end

function quest.OnWrongClick(_pos)
    over_scene_effect_widget.AddEffect("EffectOnClick", _pos)
end