* Scene ui scale 4.x-dev

Sun, 23 May 2021 13:48:02 +0300

author
cemkalyoncu
date
Sun, 23 May 2021 13:48:02 +0300
branch
4.x-dev
changeset 1688
fd16ff398275
parent 1687
dc9150a2185d
child 1689
24a4c8817968

* Scene ui scale

Source/Gorgon/Scene.cpp file | annotate | diff | comparison | revisions
Source/Gorgon/Scene.h file | annotate | diff | comparison | revisions
--- a/Source/Gorgon/Scene.cpp	Sun May 23 13:32:34 2021 +0300
+++ b/Source/Gorgon/Scene.cpp	Sun May 23 13:48:02 2021 +0300
@@ -35,6 +35,7 @@
         main.Add(graphics);
         
         parent->Add(ui);
+        ui.Resize(parent->GetInteriorSize());
         
         Animation::Governor::Activate();
 
@@ -168,5 +169,13 @@
     }
     
     
+
+    Scene::Scene(SceneManager& parent, SceneID id, bool mouseinput) : 
+        Scene(id, mouseinput)
+    {
+        this->parent = &parent;
+        ui.Resize(parent.GetInteriorSize());
+    }
+
 }
 
--- a/Source/Gorgon/Scene.h	Sun May 23 13:32:34 2021 +0300
+++ b/Source/Gorgon/Scene.h	Sun May 23 13:48:02 2021 +0300
@@ -44,11 +44,7 @@
         explicit Scene(SceneID id = NoSceneID, bool mouseinput = true);
 
         /// Sets the parent layer so that the scene can be activated.
-        explicit Scene(SceneManager &parent, SceneID id = NoSceneID, bool mouseinput = true) : 
-            Scene(id, mouseinput) 
-        {
-            this->parent = &parent;
-        }
+        explicit Scene(SceneManager &parent, SceneID id = NoSceneID, bool mouseinput = true);
 
         /// Whether this scene requires keyboard input.
         virtual bool RequiresKeyInput() const = 0;

mercurial