UIButton.cpp 495 B

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