Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

source: code/branches/core5/src/orxonox/overlays/InGameConsole.cc @ 5855

Last change on this file since 5855 was 5855, checked in by rgrieder, 15 years ago

Moved Clock from core to util (used in Scope anyway).

  • Property svn:eol-style set to native
File size: 22.7 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 *      Felix Schulthess
24 *   Co-authors:
25 *      Fabian 'x3n' Landau
26 *
27 */
28
29
30#include "InGameConsole.h"
31
32#include <algorithm>
33#include <string>
34#include <OgreOverlay.h>
35#include <OgreOverlayElement.h>
36#include <OgreOverlayManager.h>
37#include <OgreOverlayContainer.h>
38#include <OgreBorderPanelOverlayElement.h>
39#include <OgreTextAreaOverlayElement.h>
40#include <OgreFontManager.h>
41#include <OgreFont.h>
42
43#include "util/Clock.h"
44#include "util/Convert.h"
45#include "util/Math.h"
46#include "util/UTFStringConversions.h"
47#include "core/CoreIncludes.h"
48#include "core/ConfigValueIncludes.h"
49#include "core/ConsoleCommand.h"
50#include "core/input/InputManager.h"
51#include "core/input/InputState.h"
52#include "core/input/InputBuffer.h"
53
54namespace orxonox
55{
56    const int LINES = 30;
57    const float CHAR_WIDTH = 7.45f; // fix this please - determine the char-width dynamically
58
59    SetConsoleCommand(InGameConsole, openConsole, true);
60    SetConsoleCommand(InGameConsole, closeConsole, true);
61
62    InGameConsole* InGameConsole::singletonPtr_s = 0;
63
64    /**
65        @brief Constructor: Creates and initializes the InGameConsole.
66    */
67    InGameConsole::InGameConsole()
68        : consoleOverlay_(0)
69        , consoleOverlayContainer_(0)
70        , consoleOverlayNoise_(0)
71        , consoleOverlayCursor_(0)
72        , consoleOverlayBorder_(0)
73        , consoleOverlayTextAreas_(0)
74        , inputState_(0)
75    {
76        RegisterObject(InGameConsole);
77
78        this->bActive_ = false;
79        this->cursor_ = 0.0f;
80        this->cursorSymbol_ = '|';
81        this->inputWindowStart_ = 0;
82        this->numLinesShifted_ = LINES - 1;
83        // for the beginning, don't scroll
84        this->scroll_ = 0;
85
86        this->setConfigValues();
87        this->initialise();
88    }
89
90    /**
91        @brief Destructor: Destroys the TextAreas.
92    */
93    InGameConsole::~InGameConsole()
94    {
95        this->deactivate();
96
97        // destroy the input state previously created (InputBuffer gets destroyed by the Shell)
98        InputManager::getInstance().destroyState("console");
99
100        Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
101        if (ovMan)
102        {
103            if (this->consoleOverlayNoise_)
104                Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->consoleOverlayNoise_);
105            if (this->consoleOverlayCursor_)
106                Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->consoleOverlayCursor_);
107            Ogre::FontManager::getSingleton().remove("MonofurConsole");
108            if (this->consoleOverlayBorder_)
109                Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->consoleOverlayBorder_);
110            if (this->consoleOverlayTextAreas_)
111            {
112                for (int i = 0; i < LINES; i++)
113                {
114                    if (this->consoleOverlayTextAreas_[i])
115                      Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->consoleOverlayTextAreas_[i]);
116                    this->consoleOverlayTextAreas_[i] = 0;
117                }
118
119            }
120            if (this->consoleOverlayContainer_)
121                Ogre::OverlayManager::getSingleton().destroyOverlayElement(this->consoleOverlayContainer_);
122        }
123        if (this->consoleOverlayTextAreas_)
124        {
125            delete[] this->consoleOverlayTextAreas_;
126            this->consoleOverlayTextAreas_ = 0;
127        }
128
129        if (this->consoleOverlay_)
130            Ogre::OverlayManager::getSingleton().destroy(consoleOverlay_);
131    }
132
133    /**
134        @brief Sets the config values, describing the size of the console.
135    */
136    void InGameConsole::setConfigValues()
137    {
138        SetConfigValue(relativeWidth, 0.8);
139        SetConfigValue(relativeHeight, 0.4);
140        SetConfigValue(blinkTime, 0.5);
141        SetConfigValue(scrollSpeed_, 3.0f);
142        SetConfigValue(noiseSize_, 1.0f);
143        SetConfigValue(cursorSymbol_, '|');
144        SetConfigValue(bHidesAllInput_, false).callback(this, &InGameConsole::bHidesAllInputChanged);
145    }
146
147    /**
148        @brief Called whenever bHidesAllInput_ changes.
149    */
150    void InGameConsole::bHidesAllInputChanged()
151    {
152        if (inputState_)
153        {
154            if (bHidesAllInput_)
155            {
156                inputState_->setMouseHandler(&InputHandler::EMPTY);
157                inputState_->setJoyStickHandler(&InputHandler::EMPTY);
158            }
159            else
160            {
161                inputState_->setMouseHandler(0);
162                inputState_->setJoyStickHandler(0);
163            }
164        }
165    }
166
167    /**
168        @brief Initializes the InGameConsole.
169    */
170    void InGameConsole::initialise()
171    {
172        // create the corresponding input state
173        inputState_ = InputManager::getInstance().createInputState("console", false, false, InputStatePriority::Console);
174        inputState_->setKeyHandler(Shell::getInstance().getInputBuffer());
175        bHidesAllInputChanged();
176
177        // create overlay and elements
178        Ogre::OverlayManager* ovMan = Ogre::OverlayManager::getSingletonPtr();
179
180        // create actual overlay
181        this->consoleOverlay_ = ovMan->create("InGameConsoleConsole");
182
183        // create a container
184        this->consoleOverlayContainer_ = static_cast<Ogre::OverlayContainer*>(ovMan->createOverlayElement("Panel", "InGameConsoleContainer"));
185        this->consoleOverlayContainer_->setMetricsMode(Ogre::GMM_RELATIVE);
186        this->consoleOverlayContainer_->setPosition((1 - this->relativeWidth) / 2, 0);
187        this->consoleOverlayContainer_->setDimensions(this->relativeWidth, this->relativeHeight);
188        this->consoleOverlay_->add2D(this->consoleOverlayContainer_);
189
190        // create BorderPanel
191        this->consoleOverlayBorder_ = static_cast<Ogre::BorderPanelOverlayElement*>(ovMan->createOverlayElement("BorderPanel", "InGameConsoleBorderPanel"));
192        this->consoleOverlayBorder_->setMetricsMode(Ogre::GMM_PIXELS);
193        this->consoleOverlayBorder_->setMaterialName("ConsoleCenter");
194        this->consoleOverlayBorder_->setBorderSize(16, 16, 0, 16);
195        this->consoleOverlayBorder_->setBorderMaterialName("ConsoleBorder");
196        this->consoleOverlayBorder_->setLeftBorderUV(0.0, 0.49, 0.5, 0.51);
197        this->consoleOverlayBorder_->setRightBorderUV(0.5, 0.49, 1.0, 0.5);
198        this->consoleOverlayBorder_->setBottomBorderUV(0.49, 0.5, 0.51, 1.0);
199        this->consoleOverlayBorder_->setBottomLeftBorderUV(0.0, 0.5, 0.5, 1.0);
200        this->consoleOverlayBorder_->setBottomRightBorderUV(0.5, 0.5, 1.0, 1.0);
201        this->consoleOverlayContainer_->addChild(this->consoleOverlayBorder_);
202
203        // create a new font to match the requested size exactly
204        Ogre::FontPtr font = static_cast<Ogre::FontPtr>
205            (Ogre::FontManager::getSingleton().create("MonofurConsole", "General"));
206        font->setType(Ogre::FT_TRUETYPE);
207        font->setSource("Monofur.ttf");
208        font->setTrueTypeSize(18);
209        // reto: I don't know why, but setting the resolution twice as high makes the font look a lot clearer
210        font->setTrueTypeResolution(192);
211        font->addCodePointRange(Ogre::Font::CodePointRange(33, 126));
212        font->addCodePointRange(Ogre::Font::CodePointRange(161, 255));
213
214        // create the text lines
215        this->consoleOverlayTextAreas_ = new Ogre::TextAreaOverlayElement*[LINES];
216        for (int i = 0; i < LINES; i++)
217        {
218            this->consoleOverlayTextAreas_[i] = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "InGameConsoleTextArea" + multi_cast<std::string>(i)));
219            this->consoleOverlayTextAreas_[i]->setMetricsMode(Ogre::GMM_PIXELS);
220            this->consoleOverlayTextAreas_[i]->setFontName("MonofurConsole");
221            this->consoleOverlayTextAreas_[i]->setCharHeight(18);
222            this->consoleOverlayTextAreas_[i]->setParameter("colour_top", "0.21 0.69 0.21");
223            this->consoleOverlayTextAreas_[i]->setLeft(8);
224            this->consoleOverlayTextAreas_[i]->setCaption("");
225            this->consoleOverlayContainer_->addChild(this->consoleOverlayTextAreas_[i]);
226        }
227
228        // create cursor (also a text area overlay element)
229        this->consoleOverlayCursor_ = static_cast<Ogre::TextAreaOverlayElement*>(ovMan->createOverlayElement("TextArea", "InGameConsoleCursor"));
230        this->consoleOverlayCursor_->setMetricsMode(Ogre::GMM_PIXELS);
231        this->consoleOverlayCursor_->setFontName("MonofurConsole");
232        this->consoleOverlayCursor_->setCharHeight(18);
233        this->consoleOverlayCursor_->setParameter("colour_top", "0.21 0.69 0.21");
234        this->consoleOverlayCursor_->setLeft(7);
235        this->consoleOverlayCursor_->setCaption(std::string(this->cursorSymbol_, 1));
236        this->consoleOverlayContainer_->addChild(this->consoleOverlayCursor_);
237
238        // create noise
239        this->consoleOverlayNoise_ = static_cast<Ogre::PanelOverlayElement*>(ovMan->createOverlayElement("Panel", "InGameConsoleNoise"));
240        this->consoleOverlayNoise_->setMetricsMode(Ogre::GMM_PIXELS);
241        this->consoleOverlayNoise_->setPosition(5,0);
242        this->consoleOverlayNoise_->setMaterialName("ConsoleNoiseSmall");
243        // comment following line to disable noise
244        this->consoleOverlayContainer_->addChild(this->consoleOverlayNoise_);
245
246        this->windowResized(this->getWindowWidth(), this->getWindowWidth());
247
248        // move overlay "above" the top edge of the screen
249        // we take -1.2 because the border makes the panel bigger
250        this->consoleOverlayContainer_->setTop(-1.2 * this->relativeHeight);
251
252        Shell::getInstance().addOutputLevel(true);
253
254        COUT(4) << "Info: InGameConsole initialized" << std::endl;
255    }
256
257    // ###############################
258    // ###  ShellListener methods  ###
259    // ###############################
260
261    /**
262        @brief Called if all output-lines have to be redrawn.
263    */
264    void InGameConsole::linesChanged()
265    {
266        std::list<std::string>::const_iterator it = Shell::getInstance().getNewestLineIterator();
267        int max = 0;
268        for (int i = 1; i < LINES; ++i)
269        {
270            if (it != Shell::getInstance().getEndIterator())
271            {
272                ++it;
273                max = i;
274            }
275            else
276                break;
277        }
278
279        for (int i = LINES - 1; i > max; --i)
280            this->print("", i, true);
281
282        for (int i = max; i >= 1; --i)
283        {
284            --it;
285            this->print(*it, i, true);
286        }
287    }
288
289    /**
290        @brief Called if only the last output-line has changed.
291    */
292    void InGameConsole::onlyLastLineChanged()
293    {
294        if (LINES > 1)
295            this->print(*Shell::getInstance().getNewestLineIterator(), 1);
296    }
297
298    /**
299        @brief Called if a new output-line was added.
300    */
301    void InGameConsole::lineAdded()
302    {
303        this->numLinesShifted_ = 0;
304        this->shiftLines();
305        this->onlyLastLineChanged();
306    }
307
308    /**
309        @brief Called if the text in the input-line has changed.
310    */
311    void InGameConsole::inputChanged()
312    {
313        if (LINES > 0)
314            this->print(Shell::getInstance().getInput(), 0);
315
316        if (Shell::getInstance().getInput() == "" || Shell::getInstance().getInput().size() == 0)
317            this->inputWindowStart_ = 0;
318    }
319
320    /**
321        @brief Called if the position of the cursor in the input-line has changed.
322    */
323    void InGameConsole::cursorChanged()
324    {
325        unsigned int pos = Shell::getInstance().getCursorPosition() - inputWindowStart_;
326        if (pos > maxCharsPerLine_)
327            pos = maxCharsPerLine_;
328
329        this->consoleOverlayCursor_->setCaption(std::string(pos,' ') + cursorSymbol_);
330        this->consoleOverlayCursor_->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24);
331    }
332
333    /**
334        @brief Called if the console gets closed.
335    */
336    void InGameConsole::exit()
337    {
338        this->deactivate();
339    }
340
341    // ###############################
342    // ###  other external calls   ###
343    // ###############################
344
345    /**
346        @brief Used to control the actual scrolling and the cursor.
347    */
348    void InGameConsole::update(const Clock& time)
349    {
350        if (this->scroll_ != 0)
351        {
352            float oldTop = this->consoleOverlayContainer_->getTop();
353
354            if (this->scroll_ > 0)
355            {
356                // scrolling down
357                // enlarge oldTop a little bit so that this exponential function
358                // reaches 0 before infinite time has passed...
359                float deltaScroll = (oldTop - 0.01) * time.getDeltaTime() * this->scrollSpeed_;
360                if (oldTop - deltaScroll >= 0)
361                {
362                    // window has completely scrolled down
363                    this->consoleOverlayContainer_->setTop(0);
364                    this->scroll_ = 0;
365                }
366                else
367                    this->consoleOverlayContainer_->setTop(oldTop - deltaScroll);
368            }
369
370            else
371            {
372                // scrolling up
373                // note: +0.01 for the same reason as when scrolling down
374                float deltaScroll = (1.2 * this->relativeHeight + 0.01 + oldTop) * time.getDeltaTime() * this->scrollSpeed_;
375                if (oldTop - deltaScroll <= -1.2 * this->relativeHeight)
376                {
377                    // window has completely scrolled up
378                    this->consoleOverlayContainer_->setTop(-1.2 * this->relativeHeight);
379                    this->scroll_ = 0;
380                    this->consoleOverlay_->hide();
381                }
382                else
383                    this->consoleOverlayContainer_->setTop(oldTop - deltaScroll);
384            }
385        }
386
387        if (this->bActive_)
388        {
389            this->cursor_ += time.getDeltaTime();
390            if (this->cursor_ >= this->blinkTime)
391            {
392                this->cursor_ = 0;
393                bShowCursor_ = !bShowCursor_;
394                if (bShowCursor_)
395                    this->consoleOverlayCursor_->show();
396                else
397                    this->consoleOverlayCursor_->hide();
398            }
399
400            // this creates a flickering effect (extracts exactly 80% of the texture at a random location)
401            float uRand = (rand() & 1023) / 1023.0f * 0.2f;
402            float vRand = (rand() & 1023) / 1023.0f * 0.2f;
403            this->consoleOverlayNoise_->setUV(uRand, vRand, 0.8f + uRand, 0.8f + vRand);
404        }
405    }
406
407    /**
408        @brief Resizes the console elements. Call if window size changes.
409    */
410    void InGameConsole::windowResized(unsigned int newWidth, unsigned int newHeight)
411    {
412        this->windowW_ = newWidth;
413        this->windowH_ = newHeight;
414        this->consoleOverlayBorder_->setWidth(static_cast<int>(this->windowW_* this->relativeWidth));
415        this->consoleOverlayBorder_->setHeight(static_cast<int>(this->windowH_ * this->relativeHeight));
416        this->consoleOverlayNoise_->setWidth(static_cast<int>(this->windowW_ * this->relativeWidth) - 10);
417        this->consoleOverlayNoise_->setHeight(static_cast<int>(this->windowH_ * this->relativeHeight) - 5);
418        this->consoleOverlayNoise_->setTiling(consoleOverlayNoise_->getWidth() / (50.0f * this->noiseSize_), consoleOverlayNoise_->getHeight() / (50.0f * this->noiseSize_));
419
420        // now adjust the text lines...
421        this->desiredTextWidth_ = static_cast<int>(this->windowW_ * this->relativeWidth) - 12;
422
423        if (LINES > 0)
424            this->maxCharsPerLine_ = std::max(10U, static_cast<unsigned int>(static_cast<float>(this->desiredTextWidth_) / CHAR_WIDTH));
425        else
426            this->maxCharsPerLine_ = 10;
427
428        for (int i = 0; i < LINES; i++)
429        {
430            this->consoleOverlayTextAreas_[i]->setWidth(this->desiredTextWidth_);
431            this->consoleOverlayTextAreas_[i]->setTop(static_cast<int>(this->windowH_ * this->relativeHeight) - 24 - 14*i);
432        }
433
434        this->linesChanged();
435        this->cursorChanged();
436    }
437
438    // ###############################
439    // ###    internal methods     ###
440    // ###############################
441
442    /**
443        @brief Prints string to bottom line.
444        @param s String to be printed
445    */
446    void InGameConsole::print(const std::string& text, int index, bool alwaysShift)
447    {
448        char level = 0;
449        if (text.size() > 0)
450            level = text[0];
451
452        std::string output = text;
453
454        if (level >= -1 && level <= 5)
455            output.erase(0, 1);
456
457        if (LINES > index)
458        {
459            this->colourLine(level, index);
460
461            if (index > 0)
462            {
463                unsigned int linesUsed = 1;
464                while (output.size() > this->maxCharsPerLine_)
465                {
466                    ++linesUsed;
467                    this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output.substr(0, this->maxCharsPerLine_)));
468                    output.erase(0, this->maxCharsPerLine_);
469                    output.insert(0, 1, ' ');
470                    if (linesUsed > numLinesShifted_ || alwaysShift)
471                        this->shiftLines();
472                    this->colourLine(level, index);
473                }
474                this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output));
475                this->displayedText_ = output;
476                this->numLinesShifted_ = linesUsed;
477            }
478            else
479            {
480                if (output.size() > this->maxCharsPerLine_)
481                {
482                    if (Shell::getInstance().getInputBuffer()->getCursorPosition() < this->inputWindowStart_)
483                        this->inputWindowStart_ = Shell::getInstance().getInputBuffer()->getCursorPosition();
484                    else if (Shell::getInstance().getInputBuffer()->getCursorPosition() >= (this->inputWindowStart_ + this->maxCharsPerLine_ - 1))
485                        this->inputWindowStart_ = Shell::getInstance().getInputBuffer()->getCursorPosition() - this->maxCharsPerLine_ + 1;
486
487                    output = output.substr(this->inputWindowStart_, this->maxCharsPerLine_);
488                }
489                else
490                  this->inputWindowStart_ = 0;
491                this->displayedText_ = output;
492                this->consoleOverlayTextAreas_[index]->setCaption(multi_cast<Ogre::UTFString>(output));
493            }
494        }
495    }
496
497    /**
498        @brief Shows the InGameConsole.
499    */
500    void InGameConsole::activate()
501    {
502        if (!this->bActive_)
503        {
504            this->bActive_ = true;
505            InputManager::getInstance().enterState("console");
506            Shell::getInstance().registerListener(this);
507
508            this->windowResized(this->windowW_, this->windowH_);
509            this->linesChanged();
510            this->cursorChanged();
511            this->consoleOverlay_->show();
512
513            // scroll down
514            this->scroll_ = 1;
515            // the rest is done by tick
516        }
517    }
518
519    /**
520    @brief Hides the InGameConsole.
521    */
522    void InGameConsole::deactivate()
523    {
524        if (this->bActive_)
525        {
526            this->bActive_ = false;
527            InputManager::getInstance().leaveState("console");
528            Shell::getInstance().unregisterListener(this);
529
530            // scroll up
531            this->scroll_ = -1;
532            // the rest is done by tick
533        }
534    }
535
536    /**
537        @brief Shifts all output lines one line up
538    */
539    void InGameConsole::shiftLines()
540    {
541        for (unsigned int i = LINES - 1; i > 1; --i)
542        {
543            this->consoleOverlayTextAreas_[i]->setCaption(this->consoleOverlayTextAreas_[i - 1]->getCaption());
544            this->consoleOverlayTextAreas_[i]->setColourTop(this->consoleOverlayTextAreas_[i - 1]->getColourTop());
545            this->consoleOverlayTextAreas_[i]->setColourBottom(this->consoleOverlayTextAreas_[i - 1]->getColourBottom());
546        }
547    }
548
549    void InGameConsole::colourLine(int colourcode, int index)
550    {
551        if (colourcode == -1)
552        {
553            this->consoleOverlayTextAreas_[index]->setColourTop   (ColourValue(0.90, 0.90, 0.90, 1.00));
554            this->consoleOverlayTextAreas_[index]->setColourBottom(ColourValue(1.00, 1.00, 1.00, 1.00));
555        }
556        else if (colourcode == 1)
557        {
558            this->consoleOverlayTextAreas_[index]->setColourTop   (ColourValue(0.95, 0.25, 0.25, 1.00));
559            this->consoleOverlayTextAreas_[index]->setColourBottom(ColourValue(1.00, 0.50, 0.50, 1.00));
560        }
561        else if (colourcode == 2)
562        {
563            this->consoleOverlayTextAreas_[index]->setColourTop   (ColourValue(0.95, 0.50, 0.20, 1.00));
564            this->consoleOverlayTextAreas_[index]->setColourBottom(ColourValue(1.00, 0.70, 0.50, 1.00));
565        }
566        else if (colourcode == 3)
567        {
568            this->consoleOverlayTextAreas_[index]->setColourTop   (ColourValue(0.50, 0.50, 0.95, 1.00));
569            this->consoleOverlayTextAreas_[index]->setColourBottom(ColourValue(0.80, 0.80, 1.00, 1.00));
570        }
571        else if (colourcode == 4)
572        {
573            this->consoleOverlayTextAreas_[index]->setColourTop   (ColourValue(0.65, 0.48, 0.44, 1.00));
574            this->consoleOverlayTextAreas_[index]->setColourBottom(ColourValue(1.00, 0.90, 0.90, 1.00));
575        }
576        else if (colourcode == 5)
577        {
578            this->consoleOverlayTextAreas_[index]->setColourTop   (ColourValue(0.40, 0.20, 0.40, 1.00));
579            this->consoleOverlayTextAreas_[index]->setColourBottom(ColourValue(0.80, 0.60, 0.80, 1.00));
580        }
581        else
582        {
583            this->consoleOverlayTextAreas_[index]->setColourTop   (ColourValue(0.21, 0.69, 0.21, 1.00));
584            this->consoleOverlayTextAreas_[index]->setColourBottom(ColourValue(0.80, 1.00, 0.80, 1.00));
585        }
586    }
587
588    // ###############################
589    // ###      satic methods      ###
590    // ###############################
591
592    /**
593        @brief Activates the console.
594    */
595    /*static*/ void InGameConsole::openConsole()
596    {
597        InGameConsole::getInstance().activate();
598    }
599
600    /**
601        @brief Deactivates the console.
602    */
603    /*static*/ void InGameConsole::closeConsole()
604    {
605        InGameConsole::getInstance().deactivate();
606    }
607}
Note: See TracBrowser for help on using the repository browser.