//	PickupAnnouncer.h - Used to announce which pickup's been collected.
//  ----------------------------------------------------------------------------
//	This file is part of 'NiallsAVLib', base code for any kind of audiovisual
//	apps.
//	Copyright (C) 2012  Niall Moody
//	
//	This program is free software: you can redistribute it and/or modify
//	it under the terms of the GNU General Public License as published by
//	the Free Software Foundation, either version 3 of the License, or
//	(at your option) any later version.
//
//	This program is distributed in the hope that it will be useful,
//	but WITHOUT ANY WARRANTY; without even the implied warranty of
//	MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
//	GNU General Public License for more details.
//
//	You should have received a copy of the GNU General Public License
//	along with this program.  If not, see <http://www.gnu.org/licenses/>.
//	----------------------------------------------------------------------------

#ifndef PICKUPANNOUNCER_H_
#define PICKUPANNOUNCER_H_

#include "drawing/TextLayout.h"
#include "ThreeFloats.h"
#include "c0xHeaders.h"
#include "TwoFloats.h"
#include "Tweener.h"

#include <vector>
#include <string>

class Drawer;

///	Used to announce which pickup's been collected.
class PickupAnnouncer
{
  public:
	///	Constructor.
	PickupAnnouncer();
	///	Destructor.
	~PickupAnnouncer();

	///	Moves the announcement.
	void update();
	///	Draws the announcement.
	void draw(shared_ptr<Drawer>& d);

	///	Adds an announcement to be displayed.
	void trigger(const std::wstring& text, const ThreeFloats& col);
  private:
	///	Used to store announcements.
	struct Announcement
	{
		std::wstring text;
		ThreeFloats colour;
	};
	///	All the announcements waiting to be displayed.
	std::vector<Announcement> announcements;

	///	The position of the current announcement.
	float position;
	///	Used to move the announcement across the screen.
	RotSTweener<float> posTweener;

	///	The text layout for the announcement.
	TextLayout layout;
};

#endif
