Open Source Tomb Raider Engine
Vous ne pouvez pas sélectionner plus de 25 sujets Les noms de sujets doivent commencer par une lettre ou un nombre, peuvent contenir des tirets ('-') et peuvent comporter jusqu'à 35 caractères.

Console.h 842B

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748
  1. /*!
  2. * \file include/Console.h
  3. * \brief Console 'overlay'
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _CONSOLE_H_
  8. #define _CONSOLE_H_
  9. #include <string>
  10. #include <vector>
  11. #include "UI.h"
  12. /*!
  13. * \brief Console 'overlay'
  14. */
  15. class Console : public UI {
  16. public:
  17. Console();
  18. ~Console();
  19. virtual void moveToTop();
  20. virtual void makeInvisible();
  21. virtual void display();
  22. virtual void handleKeyboard(KeyboardButton key, bool pressed);
  23. virtual void handleText(char *text, bool notFinished);
  24. virtual void handleMouseScroll(int xrel, int yrel);
  25. private:
  26. void moveInHistory(bool up);
  27. std::string mInputBuffer;
  28. std::string mPartialInput;
  29. size_t mHistoryPointer;
  30. std::vector<std::string> mCommandHistory;
  31. std::string mUnfinishedInput;
  32. unsigned int mLineOffset;
  33. };
  34. Console &getConsole();
  35. #endif