Planet
navi homePPSaboutscreenshotsdownloaddevelopmentforum

Ignore:
Timestamp:
Sep 10, 2008, 1:37:36 AM (16 years ago)
Author:
rgrieder
Message:

merged gui back to trunk.
update the media repository!

Location:
code/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • code/trunk

  • code/trunk/src/orxonox/overlays/console/InGameConsole.h

    r1747 r1755  
    3737
    3838#include "core/Shell.h"
    39 #include "objects/Tickable.h"
     39#include "core/OrxonoxClass.h"
    4040#include "tools/WindowEventListener.h"
    4141
     
    4343namespace orxonox
    4444{
    45     class _OrxonoxExport InGameConsole : public TickableReal, public ShellListener, public WindowEventListener
     45    class _OrxonoxExport InGameConsole : virtual public OrxonoxClass, public ShellListener, public WindowEventListener
    4646    {
    47         public: // functions
    48             void initialise();
    49             void destroy();
    50             void setConfigValues();
     47    public: // functions
     48        InGameConsole();
     49        ~InGameConsole();
    5150
    52             virtual void tick(float dt);
     51        void initialise();
     52        void destroy();
     53        void setConfigValues();
    5354
    54             static InGameConsole& getInstance();
     55        virtual void tick(float dt);
    5556
    56             static void openConsole();
    57             static void closeConsole();
     57        static InGameConsole& getInstance() { assert(singletonRef_s); return *singletonRef_s; }
     58        static InGameConsole* getInstancePtr() { return singletonRef_s; }
    5859
    59         private: // functions
    60             InGameConsole();
    61             InGameConsole(const InGameConsole& other) {}
    62             ~InGameConsole();
     60        static void openConsole();
     61        static void closeConsole();
    6362
    64             void activate();
    65             void deactivate();
     63    private: // functions
     64        InGameConsole(const InGameConsole& other) {}
    6665
    67             void linesChanged();
    68             void onlyLastLineChanged();
    69             void lineAdded();
    70             void inputChanged();
    71             void cursorChanged();
    72             void exit();
     66        void activate();
     67        void deactivate();
    7368
    74             void shiftLines();
    75             void colourLine(int colourcode, int index);
    76             void setCursorPosition(unsigned int pos);
    77             void print(const std::string& text, int index, bool alwaysShift = false);
     69        void linesChanged();
     70        void onlyLastLineChanged();
     71        void lineAdded();
     72        void inputChanged();
     73        void cursorChanged();
     74        void exit();
    7875
    79             void windowResized(int newWidth, int newHeight);
     76        void shiftLines();
     77        void colourLine(int colourcode, int index);
     78        void setCursorPosition(unsigned int pos);
     79        void print(const std::string& text, int index, bool alwaysShift = false);
    8080
    81             static Ogre::UTFString convert2UTF(std::string s);
     81        void windowResized(int newWidth, int newHeight);
    8282
    83         private: // variables
    84             bool bActive_;
    85             int windowW_;
    86             int windowH_;
    87             int desiredTextWidth_;
    88             unsigned int maxCharsPerLine_;
    89             unsigned int numLinesShifted_;
    90             int scroll_;
    91             float cursor_;
    92             unsigned int inputWindowStart_;
    93             bool bShowCursor_;
    94             std::string displayedText_;
    95             Ogre::Overlay* consoleOverlay_;
    96             Ogre::OverlayContainer* consoleOverlayContainer_;
    97             Ogre::PanelOverlayElement* consoleOverlayNoise_;
    98             Ogre::TextAreaOverlayElement* consoleOverlayCursor_;
    99             Ogre::BorderPanelOverlayElement* consoleOverlayBorder_;
    100             Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_;
     83        static Ogre::UTFString convert2UTF(std::string s);
    10184
    102             // config values
    103             float relativeWidth;
    104             float relativeHeight;
    105             float blinkTime;
    106             float scrollSpeed_;
    107             float noiseSize_;
    108             char cursorSymbol_;
     85    private: // variables
     86        bool bActive_;
     87        int windowW_;
     88        int windowH_;
     89        int desiredTextWidth_;
     90        unsigned int maxCharsPerLine_;
     91        unsigned int numLinesShifted_;
     92        int scroll_;
     93        float cursor_;
     94        unsigned int inputWindowStart_;
     95        bool bShowCursor_;
     96        std::string displayedText_;
     97        Ogre::Overlay* consoleOverlay_;
     98        Ogre::OverlayContainer* consoleOverlayContainer_;
     99        Ogre::PanelOverlayElement* consoleOverlayNoise_;
     100        Ogre::TextAreaOverlayElement* consoleOverlayCursor_;
     101        Ogre::BorderPanelOverlayElement* consoleOverlayBorder_;
     102        Ogre::TextAreaOverlayElement** consoleOverlayTextAreas_;
     103
     104        // config values
     105        float relativeWidth;
     106        float relativeHeight;
     107        float blinkTime;
     108        float scrollSpeed_;
     109        float noiseSize_;
     110        char cursorSymbol_;
     111
     112        static InGameConsole* singletonRef_s;
    109113    };
    110114}
Note: See TracChangeset for help on using the changeset viewer.