#pragma once
#include <Widgets/Panel.h>
#include <Widgets/Label.h>
#include "../Mechanics/PlayerGame.h"
#include <sstream>
#include "BuildableList.h"
#include "Actions.h"
#include <Widgets/InlinePanel.h>
#include "Settings.h"

//for vs
#undef interface

namespace interface {

	class Buttons : public gge::widgets::InlinePanel {

	public:

		Buttons() {
			setshowvscroll(false);

			SetContainer(gge::widgets::TopLevel);

			build.Resize(70, 40);
			build.Icon=gge::widgets::WR.Icons("build");
			build.SetContainer(this);

			settings.Resize(70, 40);
			settings.Move(75, 0);
			settings.Icon=gge::widgets::WR.Icons("settings");
			settings.SetContainer(this);

			Padding=0;
			Resize(180, 40);
			Move(600,-8);

			build.ClickEvent.Register(buildableChooser, &BuildableChooser::Show);
			buildableChooser.accepted.Register(&askBuildingPlace);
			settings.ClickEvent.Register(settingsWindow, &Settings::Show);

			SetContainer(gge::widgets::TopLevel);
		}

		BuildableChooser buildableChooser;
		Settings settingsWindow;

	protected:
		gge::widgets::Button build, settings;

	};

};
