From 301edf8558f1c5a7fb1b77cd1982dc0ff8359175 Mon Sep 17 00:00:00 2001 From: Ashpect Date: Wed, 21 Sep 2022 22:57:52 +0530 Subject: [PATCH] Minor flow changes --- editor/editor.app.json | 4 ++-- editor/editor_system.cpp | 2 +- imgui.ini | 30 +++++++++++++++--------------- rootex/framework/scene.cpp | 9 +-------- rootex/framework/scene.h | 4 ++-- 5 files changed, 21 insertions(+), 28 deletions(-) diff --git a/editor/editor.app.json b/editor/editor.app.json index 508477f09..a00e7d12d 100644 --- a/editor/editor.app.json +++ b/editor/editor.app.json @@ -20,7 +20,7 @@ } }, "InputSystem": { - "height": 991, + "height": 1017, "inputSchemes": { "Editor": { "bools": [ @@ -91,7 +91,7 @@ }, "PhysicsSystem": {}, "UISystem": { - "height": 991, + "height": 1017, "width": 1920 } }, diff --git a/editor/editor_system.cpp b/editor/editor_system.cpp index 43c9b2309..73078d74e 100644 --- a/editor/editor_system.cpp +++ b/editor/editor_system.cpp @@ -318,7 +318,7 @@ void EditorSystem::drawDefaultUI(float deltaMilliseconds) ImGui::Separator(); if (ImGui::BeginMenu("Create Scene")) { - static unsigned int inputBaseID = 0; + static SceneID inputBaseID = 0; ImGui::InputText("Scene Name", &newSceneName, ImGuiInputTextFlags_AlwaysInsertMode); ImGui::InputScalar("Scene BaseID", ImGuiDataType_U32, &inputBaseID); Scene::SetBaseID(inputBaseID); diff --git a/imgui.ini b/imgui.ini index 37d35e982..81d6ed026 100644 --- a/imgui.ini +++ b/imgui.ini @@ -1,11 +1,11 @@ [Window][Rootex Editor] Pos=0,0 -Size=1920,991 +Size=1920,1017 Collapsed=0 [Window][Output] -Pos=0,620 -Size=1114,371 +Pos=0,636 +Size=1114,381 Collapsed=0 DockId=0x00000003,0 @@ -33,19 +33,19 @@ Collapsed=0 DockId=0x0000000D,0 [Window][Toolbar] -Pos=1116,620 -Size=333,371 +Pos=1116,636 +Size=333,381 Collapsed=0 DockId=0x00000004,0 [Window][Viewport] Pos=0,28 -Size=1449,590 +Size=1449,606 Collapsed=0 DockId=0x00000008,0 [Window][Inspector] -Pos=1451,409 +Pos=1451,435 Size=469,582 Collapsed=0 DockId=0x00000009,0 @@ -155,7 +155,7 @@ Collapsed=0 [Window][Scene] Pos=1451,28 -Size=469,379 +Size=469,405 Collapsed=0 DockId=0x00000007,0 @@ -170,13 +170,13 @@ Size=750,643 Collapsed=0 [Window][Load Scene] -Pos=1117,620 +Pos=1119,620 Size=30,58 Collapsed=0 [Window][Save] -Pos=1233,626 -Size=262,110 +Pos=1249,634 +Size=257,110 Collapsed=0 [Window][Style Editor] @@ -191,7 +191,7 @@ Collapsed=0 [Window][File Editor] Pos=0,28 -Size=1449,590 +Size=1449,606 Collapsed=0 DockId=0x00000008,1 @@ -201,13 +201,13 @@ Size=241,158 Collapsed=0 [Window][Content Browser] -Pos=0,620 -Size=1114,371 +Pos=0,636 +Size=1114,381 Collapsed=0 DockId=0x00000003,1 [Docking][Data] -DockSpace ID=0x654E7FDC Window=0xDC8952A0 Pos=0,28 Size=1920,963 Split=X +DockSpace ID=0x654E7FDC Window=0xDC8952A0 Pos=0,28 Size=1920,989 Split=X DockNode ID=0x00000001 Parent=0x654E7FDC SizeRef=1932,1359 Split=Y Selected=0x995B0CF8 DockNode ID=0x00000008 Parent=0x00000001 SizeRef=1932,596 Selected=0x995B0CF8 DockNode ID=0x0000000A Parent=0x00000001 SizeRef=1932,375 Split=X Selected=0xCB7211A8 diff --git a/rootex/framework/scene.cpp b/rootex/framework/scene.cpp index 38299d1b5..f64bbfbb9 100644 --- a/rootex/framework/scene.cpp +++ b/rootex/framework/scene.cpp @@ -70,8 +70,6 @@ Ptr Scene::Create(const JSON::json& sceneData, const bool assignNewIDs) } else { - /*thisSceneID = std::max(std::max(BaseID, NextSceneID), SceneIDOffset); - NextSceneID = std::max(BaseID, SceneIDOffset);*/ NextSceneID = std::max(std::max(BaseID, NextSceneID), SceneIDOffset); thisSceneID = NextSceneID; } @@ -320,11 +318,6 @@ void Scene::setName(const String& name) m_FullName = name + " # " + std::to_string(m_ID); } -void Scene::setm_BaseID(const SceneID& input) -{ - m_BaseID = BaseID; -} - JSON::json Scene::getJSON() const { JSON::json j; @@ -356,7 +349,7 @@ Scene::Scene(SceneID id, const String& name, const SceneSettings& settings, Impo , m_Entity(this) { setName(m_Name); - setm_BaseID(BaseID); + setm_BaseID(); s_Scenes.push_back(this); } diff --git a/rootex/framework/scene.h b/rootex/framework/scene.h index a9c0e5181..6c6bb1171 100644 --- a/rootex/framework/scene.h +++ b/rootex/framework/scene.h @@ -58,7 +58,7 @@ class Scene public: static void ResetNextID(); - static void Scene::SetBaseID(const SceneID& inputBaseID) { BaseID = inputBaseID; } + static void SetBaseID(const SceneID& inputBaseID) { BaseID = inputBaseID; } static Ptr Create(const JSON::json& sceneData, const bool assignNewIDs); static Ptr CreateFromFile(const String& sceneFile); @@ -82,7 +82,7 @@ class Scene bool removeChild(Scene* toRemove); void setName(const String& name); - void setm_BaseID(const SceneID& input); + void Scene::setm_BaseID(){ m_BaseID = BaseID; } JSON::json getJSON() const; bool& getIsScenePaused() { return m_IsScenePaused; }