/*Copyright (C) 2010 Deveaux Duncan

This file is part of Hikou no mizu.

Hikou no mizu 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.

Hikou no mizu 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 Hikou no mizu.  If not, see <http://www.gnu.org/licenses/>.
*/

#ifndef DEF_BUTTON
#define DEF_BUTTON

#include <SFML/Graphics.hpp>

//sf::Shape inheriting class representing an empty Button
class Button : public sf::Drawable
{
    public:
        Button();
        Button(float width, float height, const sf::Color &borderColor);
        
        bool mouseHitTest(const sf::Vector2f &mousePosition);
        
        void enableBackground(bool background);
        bool backgroundEnabled() const;
        
        void enableBorder(bool border);
        bool borderEnabled() const;
        
        void setBackgroundColor(const sf::Color &backgroundColor);
        const sf::Color &getBackgroundColor() const;
        
        void setBorderColor(const sf::Color &borderColor);
        const sf::Color &getBorderColor() const;
        
        void setBorderSize(float borderSize);
        float getBorderSize() const;
        
        float getWidth() const;
        float getHeight() const;
        
    protected:
        virtual void Render(sf::RenderTarget& target, sf::Renderer& renderer) const;
        
        sf::Shape m_background;
        float m_width;
        float m_height;
        
        bool m_backgroundEnabled;
        bool m_borderEnabled;
};

#endif