#pragma once
#include "Mod.h"

class ESP : public Mod {
public:
	int mode = 0;
	float thickness = 1.f;
	float round = 0.f;
	bool self = true;
	ESP() : Mod(_("ESP"), _("Mark the player."), Category::RENDER) {
		settings.push_back(new Setting{ _("Mode"), &mode, new int(1), new int(0), 1, {
			_("2D"),
			_("3D")
			}, true});

		settings.push_back(new Setting{ _("Thickness"), &thickness, new float(5.f), new float(0.f), 2, {}, true });
		settings.push_back(new Setting{ _("Round"), &round, new float(20.f), new float(0.f), 2, {}, true, 10.f});

		settings.push_back(new Setting{ _("Self"), &self, 0, 0, 0, {}, true });
		
		enabled = false;
	}

private:
	int perspective = 0;
	struct RenderData {
		ImVec4 rect;
		glm::vec3 lower, upper;
		float thickness;
	};
	std::vector<RenderData> renderdatas;

	virtual auto onClient() -> void override;
	virtual auto onViewPerspectiveAfter(int* perspective) -> void override;
	virtual auto onImGuiRender() -> void override;
	virtual auto getMode() -> std::string override;
};
