//
// C++ Interface: fpscounter
//
// Description:
//
//
// Author: Messenger of death aka Denis A. Birukov <messengerofdeath@gmail.com>, (C) 2008
//
// Copyright: See COPYING file that comes with this distribution
//
//
#ifndef FPSCOUNTER_H
#define FPSCOUNTER_H

#include <text.h>

/**
 @author Messenger of death aka Denis A. Birukov <messengerofdeath@gmail.com>
*/
class FPSCounter : public TextObject
{
    public:
        FPSCounter();

        ~FPSCounter();
        virtual bool load ( std::string storage_name, std::string storage_prefix, std::string scene_name, std::string object_name );
        virtual void draw();

    protected:
        std::string _pre_text_;
        int _frames_count_limit_;
        int _cur_frame_;
        uint32_t _last_time_;
        
        DECLARE_SLOT ( FPSCounter, _on_new_frame);


};

extern ObjectFabric<FPSCounter> FPSCounterFabric;
#endif
