#pragma once

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

using namespace gge;

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

public:
	MapInfo() {
		SetOrganizer(organizer);

		auto nl=organizer.nextline;

		SetWidth(350);

		organizer
			<<"Name: "<<Name<<nl
			<<"Author: "<<Author<<nl
			<<"Staring townsfolk: "<<Citizens<<nl
			<<"Population cap: "<<Popcap<<nl
			<<"Starting gold: "<<Gold<<nl
			<<"Starting hour: "<<StartingHour<<nl
			<<"Info: "<<nl
			<<Info<<nl
		;

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

		AddDialogButton(Ok);
		SetDefault(Ok);

		MoveToCenter();

		Hide();
	}

	~MapInfo() {
		RemoveOrganizer();
	}

	widgets::Button Ok;
	widgets::Textbox Name, Author, Info;
	widgets::Numberbox<int> Citizens;
	widgets::Numberbox<int> Popcap;
	widgets::Numberbox<int> Gold;
	widgets::Numberbox<int> StartingHour;
	widgets::LinearOrganizer organizer;
};
