Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 1, 2008, 3:54:20 PM (16 years ago)
Author:
rgrieder
Message:
  • @everyone: Do not create a branch until I've added the svn:eol-style property correctly. Otherwise this would cost me another 4 hours or so when we want to merge back.
  • merged network branch back to trunk
  • I had to omit the changes from last evening concerning the line endings
  • might not work yet because of the line endings
  • @beni: script branch is the only branch still open. you probably will have to apply a patch because of inconsistent new lines
File:
1 edited

Legend:

Unmodified
Added
Removed
  • code/trunk/src/orxonox/console/InGameConsole.h

    r1214 r1502  
    2323 *      Felix Schulthess
    2424 *   Co-authors:
    25  *      ...
     25 *      Fabian 'x3n' Landau
    2626 *
    2727 */
     
    3737
    3838#include "core/Tickable.h"
    39 #include "core/InputBuffer.h"
     39#include "core/Shell.h"
    4040
    4141
    4242namespace orxonox
    4343{
    44     class _OrxonoxExport InGameConsole : public InputBufferListener
     44    class _OrxonoxExport InGameConsole : public TickableReal, public ShellListener
    4545    {
    4646        public:
    47             InGameConsole(InputBuffer* ib);
    48             ~InGameConsole();
    49             void listen();
    50             void execute();
    51             void hintandcomplete();
    52             void clear();
    53             void removeLast();
    54             void exit();
    55             void init();
     47            static InGameConsole& getInstance();
     48
     49            void setConfigValues();
    5650            void tick(float dt);
     51
    5752            void activate();
    5853            void deactivate();
     54            void resize();
     55
     56            static void openConsole();
     57            static void closeConsole();
    5958
    6059        private:
    61             void resize();
    62             void print(Ogre::UTFString s);
    63             void newline();
    64             Ogre::UTFString convert2UTF(std::string s);
     60            InGameConsole();
     61            InGameConsole(const InGameConsole& other);
     62            ~InGameConsole();
    6563
    66             int windowW;
    67             int windowH;
    68             int scroll;
    69             float scrollTimer;
    70             float cursor;
    71             bool active;
    72             InputBuffer* ib_;
    73             Ogre::OverlayManager* om;
    74             Ogre::Overlay* consoleOverlay;
    75             Ogre::OverlayContainer* consoleOverlayContainer;
    76             Ogre::PanelOverlayElement* consoleOverlayNoise;
    77             Ogre::BorderPanelOverlayElement* consoleOverlayBorder;
    78             Ogre::TextAreaOverlayElement** consoleOverlayTextAreas;
     64            virtual void linesChanged();
     65            virtual void onlyLastLineChanged();
     66            virtual void lineAdded();
     67            virtual void inputChanged();
     68            virtual void cursorChanged();
     69            virtual void exit();
     70
     71            void init();
     72            void shiftLines();
     73            void colourLine(int colourcode, int index);
     74            void setCursorPosition(int pos);
     75            void print(const std::string& text, int index, bool alwaysShift = false);
     76            static Ogre::UTFString convert2UTF(std::string s);
     77
     78            static float REL_WIDTH;
     79            static float REL_HEIGHT;
     80            static float BLINK;
     81
     82            int windowW_;
     83            int windowH_;
     84            int desiredTextWidth_;
     85            unsigned int maxCharsPerLine_;
     86            unsigned int numLinesShifted_;
     87            int scroll_;
     88            float scrollTimer_;
     89            float cursor_;
     90            unsigned int inputWindowStart_;
     91            char cursorSymbol_;
     92            bool active_;
     93            bool bShowCursor_;
     94            std::string displayedText_;
     95            Ogre::OverlayManager* om_;
     96            Ogre::Overlay* consoleOverlay_;
     97            Ogre::OverlayContainer* consoleOverlayContainer_;
     98            Ogre::PanelOverlayElement* consoleOverlayNoise_;
     99            Ogre::PanelOverlayElement* consoleOverlayCursor_;
     100            Ogre::BorderPanelOverlayElement* consoleOverlayBorder_;
     101            Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_;
    79102    };
    80103}
Note: See TracChangeset for help on using the changeset viewer.