#pragma once

class TESObjectREFR;
class TileMenu;
class TileText;
class TileRect;
class TileImage;
class EnchantmentItem;
class TESForm;

// 028
class Menu
{
public:
	Menu();
	~Menu();

	virtual void	Destructor(void);
	virtual void	SetField(UInt32 idx, UInt32 value);
	virtual void	Unk_02(UInt32 arg0, UInt32 arg1);	// show menu?
	virtual void	Unk_03(UInt32 arg0, UInt32 arg1);	// handle event?
	virtual void	Unk_04(UInt32 arg0, UInt32 arg1);
	virtual void	Unk_05(UInt32 arg0, UInt32 arg1);
	virtual void	Unk_06(UInt32 arg0, UInt32 arg1, UInt32 arg2);
	virtual void	Unk_07(UInt32 arg0, UInt32 arg1, UInt32 arg2);
	virtual void	Unk_08(UInt32 arg0, UInt32 arg1);
	virtual void	Unk_09(UInt32 arg0, UInt32 arg1);
	virtual void	Unk_0A(UInt32 arg0, UInt32 arg1);
	virtual void	Unk_0B(void);
	virtual bool	Unk_0C(UInt32 arg0);
	virtual UInt32	GetID(void);
	virtual bool	Unk_0C(UInt32 arg0, UInt32 arg1);

	void	RegisterTile(TileMenu * tileMenu);
	void	EnableMenu(bool unk);

//	void	** _vtbl;	// 00
	TileMenu* tile;		// 04
	UInt32	unk08;		// 08
	UInt32	unk0C;		// 0C
	UInt32	unk10;		// 10
	UInt32	unk14;		// 14
	UInt32	unk18;		// 18
	UInt32	unk1C;		// 1C - initialized to 1
	UInt32	id;			// 20 - uninitialized
	UInt32	unk24;		// 24 - initialized to 4
};

// 64
class MessageMenu : public Menu
{
public:
	MessageMenu();
	~MessageMenu();

	UInt32	fields[14];	// 28
	UInt8	unk60;		// 60
	UInt8	pad61[3];	// 61
};

// 58
class InventoryMenu : public Menu
{
public:
	InventoryMenu();
	~InventoryMenu();

	UInt32	fields[5];	// 28
	// 3C
	// ...
};

// 5C
class HUDInfoMenu : public Menu
{
public:
	HUDInfoMenu();
	~HUDInfoMenu();

	UInt32			unk028[10];			// 028 .. 04C	- TileText
	UInt32			unk050;				// 050			- TileImage
	TESObjectREFR	* crosshairRef;		// 054
	UInt32			unk058;				//058
};

extern HUDInfoMenu**	g_HUDInfoMenu;

// 034
class TextEditMenu : public Menu
{
public:
	TextEditMenu();
	~TextEditMenu();

	// fields
	TileText*	text;				// 028
	TileImage*	unk02C;				// 02C
	TileImage*	unk030;				// 030
};

// 0A0
class EnchantmentMenu : public Menu
{
	EnchantmentMenu();
	~EnchantmentMenu();

	struct Unk0
	{
		void*		unk0;
		UInt32		unk1;	// 1
		TESForm*	form;
	};

	// fields
	EnchantmentItem*	enchantItem;	// 028
	Unk0*				soulGemInfo;	// 02C
	Unk0*				enchantableInfo;// 030
	void*				unk034;			// 034
	UInt32				cost;			// 038
	TileText*			enchantName;
	TileRect*			unk040;
	TileImage*			unk044;
	TileText*			goldValue;	
	TileText*			playerGoldValue;
	TileImage*			unk050;
	TileRect*			unk054;
	TileRect*			unk058;
	TileRect*			unk05C;
	TileImage*			unk060;
	TileImage*			unk064;
	TileImage*			unk068;
	TileImage*			unk06C;
	TileImage*			unk070;
	TileImage*			unk074;
	TileText*			applicableEffectsLabel;
	TileText*			addedEffectsLabel;
	TileRect*			unk080;
	TileRect*			unk084;
	TileImage*			unk088;
	TileImage*			unk08C;
	UInt32				unk090[4];
};
STATIC_ASSERT(sizeof(EnchantmentMenu) == 0x0A0);
// ... lots more
