Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 28, 2008, 5:30:11 AM (16 years ago)
Author:
landauf
Message:

merged console branch into network branch

after several heavy troubles it compiles, but there is still a bug I couldn't fix: orxonox crashes as soon as one presses a key after opening the console… maybe someone else sees the problem?

File:
1 edited

Legend:

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

    r1214 r1446  
    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 Tickable, 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 print(const std::string& text, int index, bool alwaysShift = false);
     75            static Ogre::UTFString convert2UTF(std::string s);
     76
     77            static float REL_WIDTH;
     78            static float REL_HEIGHT;
     79            static float BLINK;
     80
     81            int windowW_;
     82            int windowH_;
     83            int desiredTextWidth_;
     84            unsigned int maxCharsPerLine_;
     85            unsigned int numLinesShifted_;
     86            int scroll_;
     87            float scrollTimer_;
     88            float cursor_;
     89            unsigned int inputWindowStart_;
     90            char cursorSymbol_;
     91            bool active_;
     92            Ogre::OverlayManager* om_;
     93            Ogre::Overlay* consoleOverlay_;
     94            Ogre::OverlayContainer* consoleOverlayContainer_;
     95            Ogre::PanelOverlayElement* consoleOverlayNoise_;
     96            Ogre::BorderPanelOverlayElement* consoleOverlayBorder_;
     97            Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_;
    7998    };
    8099}
Note: See TracChangeset for help on using the changeset viewer.