UIActivationSuccess.cpp 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. // Copyright (c) 2014-2015, THUNDERBEAST GAMES LLC All rights reserved
  2. // Please see LICENSE.md in repository root for license information
  3. // https://github.com/AtomicGameEngine/AtomicEditor
  4. // BEGIN LICENSE MANAGEMENT
  5. #include "AtomicEditor.h"
  6. #include <TurboBadger/tb_window.h>
  7. #include <TurboBadger/tb_select.h>
  8. #include <TurboBadger/tb_editfield.h>
  9. #include <Atomic/Core/Context.h>
  10. #include <Atomic/UI/TBUI.h>
  11. #include "../Resources/AEResourceOps.h"
  12. #include "../AEPreferences.h"
  13. #include "../AEEditor.h"
  14. #include "../AEEvents.h"
  15. #include "../Project/AEProject.h"
  16. #include "../Project/ProjectUtils.h"
  17. #include "UIActivationSuccess.h"
  18. #include "AELicenseSystem.h"
  19. namespace AtomicEditor
  20. {
  21. // UIBuildSettings------------------------------------------------
  22. UIActivationSuccess::UIActivationSuccess(Context* context):
  23. UIModalOpWindow(context)
  24. {
  25. TBUI* tbui = GetSubsystem<TBUI>();
  26. window_->SetText("Product Activation Successful");
  27. tbui->LoadResourceFile(window_->GetContentRoot(), "AtomicEditor/editor/ui/activationsuccess.tb.txt");
  28. window_->ResizeToFitContent();
  29. Center();
  30. }
  31. UIActivationSuccess::~UIActivationSuccess()
  32. {
  33. }
  34. bool UIActivationSuccess::OnEvent(const TBWidgetEvent &ev)
  35. {
  36. UIModalOps* ops = GetSubsystem<UIModalOps>();
  37. if (ev.type == EVENT_TYPE_CLICK)
  38. {
  39. if (ev.target->GetID() == TBIDC("ok"))
  40. {
  41. ops->Hide();
  42. return true;
  43. }
  44. }
  45. return false;
  46. }
  47. }
  48. // END LICENSE MANAGEMENT