~ubuntu-branches/ubuntu/precise/supertuxkart/precise

« back to all changes in this revision

Viewing changes to src/guiengine/widgets/label_widget.hpp

  • Committer: Bazaar Package Importer
  • Author(s): Christoph Egger
  • Date: 2011-02-24 22:36:25 UTC
  • mfrom: (1.1.9 upstream) (6.1.4 sid)
  • Revision ID: james.westby@ubuntu.com-20110224223625-ygrjfpg92obovuch
Tags: 0.7+dfsg1-1
New upstream release

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
//  SuperTuxKart - a fun racing game with go-kart
 
2
//  Copyright (C) 2009 Marianne Gagnon
 
3
//
 
4
//  This program is free software; you can redistribute it and/or
 
5
//  modify it under the terms of the GNU General Public License
 
6
//  as published by the Free Software Foundation; either version 3
 
7
//  of the License, or (at your option) any later version.
 
8
//
 
9
//  This program is distributed in the hope that it will be useful,
 
10
//  but WITHOUT ANY WARRANTY; without even the implied warranty of
 
11
//  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 
12
//  GNU General Public License for more details.
 
13
//
 
14
//  You should have received a copy of the GNU General Public License
 
15
//  along with this program; if not, write to the Free Software
 
16
//  Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.
 
17
 
 
18
 
 
19
 
 
20
#ifndef HEADER_LABEL_HPP
 
21
#define HEADER_LABEL_HPP
 
22
 
 
23
#include <irrlicht.h>
 
24
 
 
25
#include "guiengine/widget.hpp"
 
26
#include "utils/ptr_vector.hpp"
 
27
 
 
28
namespace GUIEngine
 
29
{
 
30
    /** \brief A simple label widget.
 
31
      * \ingroup widgets
 
32
      */
 
33
    class LabelWidget : public Widget
 
34
    {
 
35
        bool               m_has_color;
 
36
        irr::video::SColor m_color;
 
37
 
 
38
    public:
 
39
                 LabelWidget(bool title=false, bool bright=false);
 
40
        virtual ~LabelWidget() {}
 
41
        
 
42
        virtual void add();
 
43
                
 
44
        /** Sets the color of the widget. 
 
45
         *  \param color The color to use for this widget. */
 
46
        void     setColor(const irr::video::SColor& color)
 
47
        {
 
48
            m_color     = color;
 
49
            m_has_color = true;
 
50
        }   // setColor
 
51
        
 
52
    };
 
53
}
 
54
 
 
55
#endif