/*
 * PopUp.h
 *
 *  Created on: 2009-07-11
 *      Author: wasyl
 */

#ifndef POPUP_H_
#define POPUP_H_

#include <allegro5/allegro.h>
#include <allegro5/a5_font.h>
#include <allegro5/a5_ttf.h>
#include "../prep/ent/Entity.h"
#include <vector>

class PopUp : public Entity
{
private:
	struct Line{
		std::string left, right;
	};

	bool mShown;
	ALLEGRO_FONT *mFont;

public:
	std::vector<Line> lines;

	PopUp();
	~PopUp();

	int *indices()
	{
		static int ind[] = {ID("entt"), ID("rndr"), ID("posi"), 0};
		return ind;
	}

	int order(int index)
	{
		if (index == ID("rndr"))
			return 99;
		else
			return (int)this;
	}

	void addLine(std::string left, std::string right)
	{
		Line l = {left,right};
		lines.push_back(l);
	}
	void setShown(bool show) { mShown = show; }

	void render();
};

#endif /* POPUP_H_ */
