TBUI.cpp 1.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687
  1. #include "Precompiled.h"
  2. #ifdef ATOMIC_TBUI
  3. #include "../Core/Context.h"
  4. #include "../Core/CoreEvents.h"
  5. #include "../Core/Profiler.h"
  6. #include "../IO/Log.h"
  7. #include "../IO/File.h"
  8. #include "../Resource/ResourceCache.h"
  9. #include "../Graphics/Graphics.h"
  10. #include "../Graphics/GraphicsEvents.h"
  11. #include "../Graphics/Texture2D.h"
  12. #include "../Graphics/VertexBuffer.h"
  13. #include "../Input/Input.h"
  14. #include "../Input/InputEvents.h"
  15. #include "../UI/TBUI.h"
  16. #include <TurboBadger/tb_core.h>
  17. #include <TurboBadger/tb_system.h>
  18. #include "UIView.h"
  19. using namespace tb;
  20. namespace tb
  21. {
  22. void TBSystem::RescheduleTimer(double fire_time)
  23. {
  24. }
  25. }
  26. namespace Atomic
  27. {
  28. TBUI::TBUI(Context* context) :
  29. Object(context)
  30. {
  31. }
  32. TBUI::~TBUI()
  33. {
  34. }
  35. void TBUI::Render()
  36. {
  37. theView_->Render();
  38. }
  39. tb::TBWidget* TBUI::GetRootWidget()
  40. {
  41. return theView_->GetRootWidget();
  42. }
  43. bool TBUI::LoadResourceFile(tb::TBWidget* widget, const String& filename)
  44. {
  45. return theView_->LoadResourceFile(widget, filename);
  46. }
  47. void TBUI::Shutdown()
  48. {
  49. theView_->SetInputDisabled(true);
  50. theView_ = 0;
  51. }
  52. void TBUI::Initialize()
  53. {
  54. theView_ = new UIView(context_);
  55. }
  56. }
  57. #endif