Sun, 23 May 2021 13:48:02 +0300
* 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;