#pragma once

#include <Widgets/DialogWindow.h>
#include <Widgets/Button.h>
#include <Widgets/Numberbox.h>
#include <Widgets/Organizers/LinearOrganizer.h>

using namespace gge;

class NewFileDialog : public widgets::DialogWindow {
	friend class UI;

public:
	NewFileDialog() {
		SetOrganizer(organizer);

		auto nl=organizer.nextline;

		SetWidth(200);

		Width=40;
		Height=40;
		BG="Water";

		organizer
			<<"Please enter the size and ground tileset name."<<nl
			<<"Tileset: "<<BG<<nl
			<<"Width: "<<Width<<nl
			<<"Height: "<<Height<<nl
		;

		Title="New Map";
		Ok.Text="Ok";

		AddDialogButton(Ok);
		SetDefault(Ok);

		Hide();
	}

	~NewFileDialog() {
		RemoveOrganizer();
	}

	widgets::Button Ok;
	widgets::Textbox BG;
	widgets::Numberbox<int> Width, Height;
	widgets::LinearOrganizer organizer;
};
