// Project Lab - NHTV Igad

#pragma once

#include "MenuButton.h"
#include "SkillSelectorItem.generated.h"

/**
 * 
 */
UCLASS()
class UNREALPROJECT_API USkillSelectorItem : public UMenuButton
{
	GENERATED_BODY()
	
public:
	virtual void NativeConstruct() override;
	virtual void NativeTick(const FGeometry& MyGeometry, float InDeltaTime) override;
	
	virtual void NativeOnSelectionChanged(bool selected, bool controller) override;
	//virtual FReply NativeOnMouseButtonDown(const FGeometry& InGeometry, const FPointerEvent& InMouseEvent) override;

	int32 index;
	class USkillSelector* parent;
	class UBaseSkillObject* baseSkillObject;

	UPROPERTY(BlueprintReadOnly, Category = UI)
	class USkillTreeWidget* skillTree;

	UPROPERTY(EditDefaultsOnly, Category = UI)
	TSubclassOf<class USkillWidget> skillWidget;
	
	UFUNCTION(BlueprintCallable, Category = UI)
	USkillSelector* GetSelector() const
	{
		return parent;
	}

	UFUNCTION(BlueprintCallable, Category = UI)
	class USkillWidget* GetSkillWidget()
	{
		return m_skillWidget;
	}

private:
	UFUNCTION()
	void m_OnPressed1();

	class USkillWidget* m_skillWidget;
};
