DebugHud.pkg 2.0 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758
  1. $#include "Engine/DebugHud.h"
  2. static const unsigned DEBUGHUD_SHOW_NONE;
  3. static const unsigned DEBUGHUD_SHOW_STATS;
  4. static const unsigned DEBUGHUD_SHOW_MODE;
  5. static const unsigned DEBUGHUD_SHOW_PROFILER;
  6. static const unsigned DEBUGHUD_SHOW_MEMORY;
  7. static const unsigned DEBUGHUD_SHOW_EVENTPROFILER;
  8. static const unsigned DEBUGHUD_SHOW_ALL;
  9. class DebugHud : public Object
  10. {
  11. void Update();
  12. void SetDefaultStyle(XMLFile* style);
  13. void SetMode(unsigned mode);
  14. void SetProfilerMaxDepth(unsigned depth);
  15. void SetProfilerInterval(float interval);
  16. void SetUseRendererStats(bool enable);
  17. void Toggle(unsigned mode);
  18. void ToggleAll();
  19. XMLFile* GetDefaultStyle() const;
  20. Text* GetStatsText() const;
  21. Text* GetModeText() const;
  22. Text* GetProfilerText() const;
  23. unsigned GetMode() const;
  24. unsigned GetProfilerMaxDepth() const;
  25. float GetProfilerInterval() const;
  26. bool GetUseRendererStats() const;
  27. void SetAppStats(const String label, const Variant stats);
  28. void SetAppStats(const String label, const String stats);
  29. bool ResetAppStats(const String label);
  30. void ClearAppStats();
  31. tolua_property__get_set XMLFile* defaultStyle;
  32. tolua_readonly tolua_property__get_set Text* statsText;
  33. tolua_readonly tolua_property__get_set Text* modeText;
  34. tolua_readonly tolua_property__get_set Text* profilerText;
  35. tolua_property__get_set unsigned mode;
  36. tolua_property__get_set unsigned profilerMaxDepth;
  37. tolua_property__get_set float profilerInterval;
  38. tolua_property__get_set bool useRendererStats;
  39. };
  40. DebugHud* GetDebugHud();
  41. tolua_readonly tolua_property__get_set DebugHud* debugHud;
  42. ${
  43. #define TOLUA_DISABLE_tolua_EngineLuaAPI_GetDebugHud00
  44. static int tolua_EngineLuaAPI_GetDebugHud00(lua_State* tolua_S)
  45. {
  46. return ToluaGetSubsystem<DebugHud>(tolua_S);
  47. }
  48. #define TOLUA_DISABLE_tolua_get_debugHud_ptr
  49. #define tolua_get_debugHud_ptr tolua_EngineLuaAPI_GetDebugHud00
  50. $}