UIContainer.cpp 600 B

123456789101112131415161718192021222324252627282930313233343536
  1. #include <TurboBadger/tb_widgets.h>
  2. #include <TurboBadger/tb_widgets_common.h>
  3. #include <Atomic/IO/Log.h>
  4. #include "UIEvents.h"
  5. #include "UI.h"
  6. #include "UIContainer.h"
  7. using namespace tb;
  8. namespace Atomic
  9. {
  10. UIContainer::UIContainer(Context* context, bool createWidget) : UIWidget(context, false)
  11. {
  12. if (createWidget)
  13. {
  14. widget_ = new TBContainer();
  15. widget_->SetDelegate(this);
  16. GetSubsystem<UI>()->WrapWidget(this, widget_);
  17. }
  18. }
  19. UIContainer::~UIContainer()
  20. {
  21. }
  22. bool UIContainer::OnEvent(const tb::TBWidgetEvent &ev)
  23. {
  24. return UIWidget::OnEvent(ev);
  25. }
  26. }