// Project Lab - NHTV Igad

#pragma once

#include "SubMenu.h"
#include "MenuButton.h"
#include "OverlayMessageBox.generated.h"

UCLASS()
class UOverlayMessageBoxItem : public UMenuButton
{
	GENERATED_BODY()
public:
	virtual void NativeConstruct() override;
	void SetText(const FString& text);
private:
	void m_OnPressed();

	friend class UOverlayMessageBox;
	UTextBlock* m_label;
	class UMsgBoxInfo* m_info;
};

UCLASS()
class UOverlayMessageBox : public USubMenu
{
	GENERATED_BODY()
public:
	virtual void NativeConstruct() override;

	void SetMessageBoxInfo(class UMsgBoxInfo* info);

	UPROPERTY(BlueprintReadWrite, Category = "MsgBox")
	int32 returnCode;
	UPROPERTY(EditDefaultsOnly, Category = "MsgBox")
	TSubclassOf<UOverlayMessageBoxItem> buttonItemClass;

private:
	UPROPERTY()
	UHorizontalBox* m_buttonContainer;
	UPROPERTY()
	UTextBlock* m_caption;
	UPROPERTY()
	UTextBlock* m_message;
	class UMsgBoxInfo* m_info;
};
