UIView.cpp 439 B

1234567891011121314151617181920212223242526272829303132
  1. #include <TurboBadger/tb_widgets.h>
  2. #include "UI.h"
  3. #include "UIView.h"
  4. using namespace tb;
  5. namespace Atomic
  6. {
  7. UIView::UIView(Context* context) : UIWidget(context, false)
  8. {
  9. widget_ = new TBWidget();
  10. widget_->SetDelegate(this);
  11. UI* ui = GetSubsystem<UI>();
  12. TBRect rect = ui->GetRootWidget()->GetRect();
  13. widget_->SetSize(rect.w, rect.h);
  14. ui->GetRootWidget()->AddChild(widget_);
  15. }
  16. UIView::~UIView()
  17. {
  18. }
  19. }