#pragma once
#include "Mod.h"

class NameTags : public Mod {
public:
	bool self = true;
	bool bold = true;
	bool color = false;
	bool showhp = false;
	float round = 0.f;
	float opacity = 0.4f;
	float blurs = 5.f;

	NameTags() : Mod(_("Name Tags"), _("Display the player's name above the player."), Category::RENDER) {
		settings.push_back(new Setting{ _("Bold"), &bold, 0, 0, 0, {}, true });
		settings.push_back(new Setting{ _("Self"), &self, 0, 0, 0, {}, true });
		settings.push_back(new Setting{ _("Color"), &color, 0, 0, 0, {}, true });
		settings.push_back(new Setting{ _("Show HP"), &showhp, 0, 0, 0, {}, true });

		settings.push_back(new Setting{ _("Round"), &round, new float(20.f), new float(0.f), 2, {}, true, 5.f });
		settings.push_back(new Setting{ _("Opacity"), &opacity, new float(1.f), new float(0.f), 2, {}, true });
		settings.push_back(new Setting{ _("Blurs"), &blurs, new float(10.f), new float(0.f), 2, {}, true, 10.f });

		enabled = false;
	}

private:
	int perspective = 0;
	struct RenderData {
		std::string name;
		std::string hp;
		ImVec2 pos;
		Player* player;
	};
	std::vector<RenderData> renderdatas;
	
	virtual auto onClient() -> void override;
	virtual auto onViewPerspectiveAfter(int* perspective) -> void override;
	virtual auto onImGuiRender() -> void override;
	virtual auto onDimensionChanged() -> void override;
};
