Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Jun 9, 2008, 6:21:04 PM (16 years ago)
Author:
rgrieder
Message:
  • cleaned up InGameConsole a little bit
  • adjusted noise (has a config value noiseSize_)
  • replaced panel cursor with text area cursor
  • initialise()/destroy() concept like in other Singletons
  • therefore console is initialised and destroyed via Orxonox class (earlier message colouring)
  • replace linear console scroll with exponential one (no, it doesn't take infinite time to reach 0 ;))

UPDATE YOUR MEDIA REPOSITORY!

File:
1 edited

Legend:

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

    r1540 r1577  
    4444    class _OrxonoxExport InGameConsole : public TickableReal, public ShellListener
    4545    {
    46         public:
     46        public: // functions
     47            void initialise();
     48            void destroy();
     49            void setConfigValues();
     50
     51            void tick(float dt);
     52            void resize();
     53
    4754            static InGameConsole& getInstance();
    4855
    49             void setConfigValues();
    50             void tick(float dt);
    51 
    52             void resize();
    5356            static void openConsole();
    5457            static void closeConsole();
    5558
    56         private:
     59        private: // functions
    5760            InGameConsole();
    58             InGameConsole(const InGameConsole& other);
     61            InGameConsole(const InGameConsole& other) {}
    5962            ~InGameConsole();
    6063
     
    6265            void deactivate();
    6366
    64             virtual void linesChanged();
    65             virtual void onlyLastLineChanged();
    66             virtual void lineAdded();
    67             virtual void inputChanged();
    68             virtual void cursorChanged();
    69             virtual void exit();
     67            void linesChanged();
     68            void onlyLastLineChanged();
     69            void lineAdded();
     70            void inputChanged();
     71            void cursorChanged();
     72            void exit();
    7073
    71             void init();
    7274            void shiftLines();
    7375            void colourLine(int colourcode, int index);
    7476            void setCursorPosition(unsigned int pos);
    7577            void print(const std::string& text, int index, bool alwaysShift = false);
     78
    7679            static Ogre::UTFString convert2UTF(std::string s);
    7780
    78             static float REL_WIDTH;
    79             static float REL_HEIGHT;
    80             static float BLINK;
    81 
     81        private: // variables
    8282            bool bActive_;
    8383            int windowW_;
     
    9292            bool bShowCursor_;
    9393            std::string displayedText_;
    94             Ogre::OverlayManager* om_;
    9594            Ogre::Overlay* consoleOverlay_;
    9695            Ogre::OverlayContainer* consoleOverlayContainer_;
    9796            Ogre::PanelOverlayElement* consoleOverlayNoise_;
    98             Ogre::PanelOverlayElement* consoleOverlayCursor_;
     97            Ogre::TextAreaOverlayElement* consoleOverlayCursor_;
    9998            Ogre::BorderPanelOverlayElement* consoleOverlayBorder_;
    10099            Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_;
     100
     101            // config values
     102            float relativeWidth;
     103            float relativeHeight;
     104            float blinkTime;
     105            float scrollSpeed_;
     106            float noiseSize_;
    101107    };
    102108}
Note: See TracChangeset for help on using the changeset viewer.