Josh Engebretson 10 years ago
parent
commit
c7520ad3f9

+ 6 - 0
Source/AtomicEditor/Source/Player/AEPlayer.cpp

@@ -93,6 +93,12 @@ void AEPlayer::Invalidate()
     ops->Hide();
     context_->RemoveSubsystem<AEPlayer>();
     GetSubsystem<UI>()->GetRoot()->RemoveAllChildren();
+
+// BEGIN LICENSE MANAGEMENT
+    if (uiPlayer_.NotNull() && uiPlayer_->Show3DInfo())
+        ops->ShowInfoModule3D();
+// END LICENSE MANAGEMENT
+
 }
 
 void AEPlayer::HandleJSError(StringHash eventType, VariantMap& eventData)

+ 5 - 7
Source/AtomicEditor/Source/Player/UIPlayer.cpp

@@ -42,7 +42,8 @@ UIPlayer::UIPlayer(Context* context):
 
 // BEGIN LICENSE MANAGEMENT
     LicenseSystem* license = GetSubsystem<LicenseSystem>();
-    starterLicense_ = license->IsStandardLicense();
+    standardLicense_ = license->IsStandardLicense();
+    show3DInfo_ = false;
 // END LICENSE MANAGEMENT
 
     aePlayer_ = GetSubsystem<AEPlayer>();
@@ -108,15 +109,12 @@ void UIPlayer::HandleUpdate(StringHash eventType, VariantMap& eventData)
     UI* ui = GetSubsystem<UI>();
 
     // BEGIN LICENSE MANAGEMENT
-    if (starterLicense_)
+    if (standardLicense_)
     {
         Camera* camera = view3D_->GetViewport()->GetCamera();
         if (camera && !camera->IsOrthographic())
         {
-            UIModalOps* ops = GetSubsystem<UIModalOps>();
-            ops->Hide();
-            ops->ShowInfoModule3D();
-            starterLicense_ = false;
+            show3DInfo_ = true;
         }
     }
     // END LICENSE MANAGEMENT
@@ -138,7 +136,7 @@ bool UIPlayer::OnEvent(const TBWidgetEvent &ev)
         {
             if (GetSubsystem<Editor>()->IsPlayingProject())
             {
-                SendEvent(E_EDITORPLAYSTOP);
+                SendEvent(E_EDITORPLAYSTOP);                               
                 return true;
             }
         }

+ 3 - 1
Source/AtomicEditor/Source/Player/UIPlayer.h

@@ -33,6 +33,7 @@ public:
     Viewport* SetView(Scene* scene, Camera* camera);
 
     bool OnEvent(const TBWidgetEvent &ev);
+    bool Show3DInfo() { return show3DInfo_; }
 
     const IntVector2& GetPlayerSize() { return playerSize_; }
 
@@ -44,7 +45,8 @@ private:
 
     IntVector2 playerSize_;
 
-    bool starterLicense_;    
+    bool standardLicense_;
+    bool show3DInfo_;
 };
 
 }