UISection.cpp 631 B

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