#pragma once

#include "UiFrameWork.h"

KGE_DECLARE_SMART_PTR(SquirrelButton);

class SquirrelButton : public UiFrameWork
{
private:
	//正常态纹理
	std::string NORMAL = "ImagePacks2/Error/base.png";
	//禁用态纹理
	std::string DISABLE = "ImagePacks2/Error/base.png";
	//悬停态纹理
	std::string HOVER = "ImagePacks2/Error/base.png";
	//按下态纹理
	std::string PRESS = "ImagePacks2/Error/base.png";

	//自身状态
	int MyState = 0;

	//是否左键点击
	bool _is_Left_Press = false;
	//是否右键点击
	bool _is_Right_Press = false;
	//是否中键点击
	bool _is_Middle_Press = false;
	//是否悬停
	bool _is_Hover = false;

public:
	SquirrelButton() {
		Init();
	}

	void Init() override;
	void OnClick(Event* evt);
	void OnHover()override;
	void OnOut()override;
	void OnDown(Event* evt);
	void OnUp(Event* evt);
	bool IsPress(const int Type);
	bool IsHover();

	void SetState(const int state);

	void OnUpdate(Duration dt) override;
};

