#pragma once

#include <Widgets/Panel.h>
#include <Widgets/Label.h>
#include "../Mechanics/PlayerGame.h"
#include <sstream>
#include <Widgets/Organizers/LinearOrganizer.h>
#include "../Mechanics/Townsfolk.h"
#include "../Mechanics/Soldier.h"
#include <Widgets/Window.h>
#include <Widgets/DialogWindow.h>
#include <Widgets/Listbox.h>
#include "../Assets/Buildings.h"
#include "../Mechanics/Artisan.h"
#include "Actions.h"

//for vs
#undef interface

namespace interface {

	class Credits : public gge::widgets::Window {
	public:
		Credits() {
			SetWidth(200);

			Title="Credits (partial)";

			std::ifstream file("partialcredits.txt");
			std::string credits;

			while(!file.eof()) {
				std::string t;
				std::getline(file, t);
				credits+=t+"\n";
			}

			text.SetWidth(180);
			text.Text=credits;
			text.SetContainer(this);

			SetHeight(text.GetBounds().Bottom+40);

			Hide();

		}

		virtual void Show() {
			gge::widgets::Window::Show(true);
			MoveToCenter();
		}

	protected:
		gge::widgets::ListOrganizer organizer;

		gge::widgets::Label text;
	};

}
