Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/overlay/src/orxonox/overlays/stats/CreateLines.cc @ 2200

Last change on this file since 2200 was 2200, checked in by bhildebr, 15 years ago

Added framework for class CreateLines to create multiple lines on the scoreboard

File size: 2.0 KB
Line 
1/*
2 *   ORXONOX - the hottest 3D action shooter ever to exist
3 *                    > www.orxonox.net <
4 *
5 *
6 *   License notice:
7 *
8 *   This program is free software; you can redistribute it and/or
9 *   modify it under the terms of the GNU General Public License
10 *   as published by the Free Software Foundation; either version 2
11 *   of the License, or (at your option) any later version.
12 *
13 *   This program is distributed in the hope that it will be useful,
14 *   but WITHOUT ANY WARRANTY; without even the implied warranty of
15 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
16 *   GNU General Public License for more details.
17 *
18 *   You should have received a copy of the GNU General Public License
19 *   along with this program; if not, write to the Free Software
20 *   Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
21 *
22 *   Author:
23 *      Benjamin Hildebrandt
24 *
25 */
26
27#include "OrxonoxStableHeaders.h"
28#include "CreateLines.h"
29
30#include <string>
31#include <OgreOverlay.h>
32#include <OgreOverlayElement.h>
33#include <OgreOverlayManager.h>
34#include <OgreOverlayContainer.h>
35
36#include "util/Convert.h"
37#include "util/Debug.h"
38#include "core/CoreIncludes.h"
39#include "core/ConfigValueIncludes.h"
40
41namespace orxonox
42{
43    CreateFactory(CreateLines);
44
45    /**
46        @brief Constructor: Creates and initializes a line.
47    */
48    CreateLines::CreateLines(BaseObject* creator)
49        : OrxonoxOverlay(creator)
50    {
51        RegisterObject(CreateLines);
52    }
53
54    /**
55        @brief Initializes the lines.
56    */
57    void CreateLines::XMLPort(Element& xmlElement, XMLPort::Mode mode)
58    {
59        SUPER(CreateLines, XMLPort, xmlElement, mode);
60    }
61
62    void createTextArea(unsigned int lineIndex) {
63
64        this->statsOverlayTextAreas_ = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "StatsLineTextArea" + getName() + convertToString(lineIndex)));
65        this->overlay_->add2D(this->statsOverlayTextAreas_);
66
67        // this->textColumns_.push_back();    pointer to be added
68
69    }
70
71}
Note: See TracBrowser for help on using the repository browser.