Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
May 18, 2008, 1:28:08 AM (16 years ago)
Author:
landauf
Message:

changed some parts of InGameConsole to make it work with Shell, but I couldn't test it yet as there seems to be a bug in InputBuffer.

File:
1 edited

Legend:

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

    r1181 r1317  
    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();
     50
     51            virtual void linesChanged();
     52            virtual void onlyLastLineChanged();
     53            virtual void lineAdded();
     54            virtual void inputChanged();
     55            virtual void cursorChanged();
     56            virtual void exit();
     57
    5658            void tick(float dt);
     59
    5760            void activate();
    5861            void deactivate();
    5962
     63            static void openConsole();
     64            static void closeConsole();
     65
    6066        private:
     67            InGameConsole();
     68            InGameConsole(const InGameConsole& other);
     69            ~InGameConsole();
     70
     71            void init();
    6172            void resize();
    6273            void print(Ogre::UTFString s);
    6374            void newline();
    64             Ogre::UTFString convert2UTF(std::string s);
     75            static Ogre::UTFString convert2UTF(std::string s);
    6576
    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;
     77            static float REL_WIDTH;
     78            static float REL_HEIGHT;
     79            static float BLINK;
     80
     81            int windowW_;
     82            int windowH_;
     83            int scroll_;
     84            float scrollTimer_;
     85            float cursor_;
     86            bool active_;
     87            Ogre::OverlayManager* om_;
     88            Ogre::Overlay* consoleOverlay_;
     89            Ogre::OverlayContainer* consoleOverlayContainer_;
     90            Ogre::PanelOverlayElement* consoleOverlayNoise_;
     91            Ogre::BorderPanelOverlayElement* consoleOverlayBorder_;
     92            Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_;
    7993    };
    8094}
Note: See TracChangeset for help on using the changeset viewer.