#pragma once
#include "Mod.h"

class Trail : public Mod {
public:
	int mode = 0;
	float rps = 1.f, segments = 24.f, size = 10.f;
	float sps = 1.f;
	Trail() : Mod(_("Trail"), _("Show the trail from your foot."), Category::RENDER) {
		settings.push_back(new Setting{ _("Mode"), &mode, new int(1), new int(0), 1, {_("Ball"), _("Line")}, true});
		settings.push_back(new Setting{ _("Rps"), &rps, new float(2.f), new float(0.f), 2, {}, true });
		settings.push_back(new Setting{ _("Segs"), &segments, new float(30.f), new float(0.f), 2, {}, true, 5.f });
		settings.push_back(new Setting{ _("Size"), &size, new float(20.f), new float(0.f), 2, {}, true, 5.f });

		settings.push_back(new Setting{ _("Sps"), &sps, new float(20.f), new float(0.f), 2, {}, true, 5.f });


		enabled = false;
	}

private:
	struct RenderData {
		long long start;
		glm::vec3 pos;
		ImColor color;
	};

	std::vector<RenderData> renderdatas;
	virtual auto onClient() -> void override;
	virtual auto onImGuiRender() -> void override;
	virtual auto onDimensionChanged() -> void override;
	virtual auto getMode() -> std::string override;
};
