UIActivationSuccess.cpp 1.9 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182
  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/AtomicGameEngine
  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/UI.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. UI* tbui = GetSubsystem<UI>();
  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. /*
  42. LicenseSystem* licenseSystem = GetSubsystem<LicenseSystem>();
  43. if (licenseSystem->IsStarterLicense())
  44. {
  45. SharedPtr<UIActivationSuccess> keepAlive(this);
  46. UIModalOps* ops = GetSubsystem<UIModalOps>();
  47. ops->Hide();
  48. ops->ShowPlatformsInfo();
  49. return true;
  50. }
  51. */
  52. ops->Hide();
  53. return true;
  54. }
  55. }
  56. return false;
  57. }
  58. }
  59. // END LICENSE MANAGEMENT