Open Source Tomb Raider Engine
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Console.h 706B

12345678910111213141516171819202122232425262728293031323334353637
  1. /*!
  2. * \file include/Console.h
  3. * \brief Console class
  4. *
  5. * \author xythobuz
  6. */
  7. #ifndef _CONSOLE_H_
  8. #define _CONSOLE_H_
  9. #include <string>
  10. #include <vector>
  11. struct ImGuiTextEditCallbackData;
  12. class Console {
  13. public:
  14. static void display();
  15. static bool isVisible() { return visible; }
  16. static void setVisible(bool v) { visible = v; }
  17. private:
  18. static int callback(ImGuiTextEditCallbackData* data);
  19. const static int bufferLength = 256;
  20. static bool visible;
  21. static char buffer[bufferLength + 1];
  22. static unsigned long lastLogLength;
  23. static std::vector<std::string> lastCommands;
  24. static long lastCommandIndex;
  25. static std::string bufferedCommand;
  26. };
  27. #endif