--модуль для отрисовки эффектов поверх хога
hog_gui_effects = {}

__inherite(hog_gui_effects, null_lua_widget_handler())

function hog_gui_effects.__CreateInstance()
    return "hog_gui_effects"
end

function hog_gui_effects.CreateStatrLevelClip(_text)
	hog_gui_effects._start_clip = s11.effects.visual.CTextClip(hog_window.level_name_clip, _text, hog_window.level_name_clip_pos, 1, hog_gui_effects._timer.Get())
end

function hog_gui_effects.Load(_this, _info, _templates)
	hog_gui_effects._timer = __create_timer()

	hog_gui_effects._start_clip = nil
	--return true
end

function hog_gui_effects.DoUpdate(_this)
	if hog_gui_effects._start_clip then
		hog_gui_effects._start_clip.Update()
		if hog_gui_effects._start_clip.IsDead() then
			hog_gui_effects._start_clip = nil
		end
	end
	return false
end

function hog_gui_effects.DoDraw(_this, _renderer)
	if hog_gui_effects._start_clip then
		hog_gui_effects._start_clip.Draw(_renderer)
	end

    return false
end

function hog_gui_effects.OnMouseMove(_this, _pos, _state, _broadcast)
    return false
end

function hog_gui_effects.OnMouseUp(_this, _pos, _button, _state, _broadcast)
    return false
end

function hog_gui_effects.OnMouseDown(_this, _pos, _button, _state, _broadcast)
    return false
end

function hog_gui_effects.OnDoubleClick(_this, _pos, _state, _broadcast)
    return true
end
