Skip to content

Commit

Permalink
Final Adjustments for Realese v0.2
Browse files Browse the repository at this point in the history
  • Loading branch information
Hekbas committed Dec 21, 2023
1 parent 03d2797 commit 72886f4
Show file tree
Hide file tree
Showing 7 changed files with 39 additions and 41 deletions.
3 changes: 3 additions & 0 deletions TheOneEditor/Gui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,9 @@ bool Gui::Update(double dt)
ImGui::EndMenu();
}


// Play/Pause/Stop
ImGui::Dummy(ImVec2(250.0f, 0.0f));
if (ImGui::Button("Play")) {
app->Play();
}
Expand Down
3 changes: 0 additions & 3 deletions TheOneEditor/PanelGame.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ PanelGame::~PanelGame() {}

bool PanelGame::Draw()
{
// Flag to track whether Button 2 was clicked
static bool showCameraSettings = false;

ImGuiWindowFlags settingsFlags = 0;
settingsFlags = ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_MenuBar;

Expand Down
7 changes: 2 additions & 5 deletions TheOneEditor/PanelScene.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,6 @@ PanelScene::~PanelScene() {}

bool PanelScene::Draw()
{
// Flag to track whether Button 2 was clicked
static bool showCameraSettings = false;

ImGuiWindowFlags settingsFlags = 0;
settingsFlags = ImGuiWindowFlags_NoFocusOnAppearing | ImGuiWindowFlags_NoScrollbar | ImGuiWindowFlags_NoScrollWithMouse | ImGuiWindowFlags_MenuBar;

Expand Down Expand Up @@ -97,13 +94,13 @@ bool PanelScene::Draw()
app->engine->Render(sceneCam);

// Game cameras Frustum
for (const auto GO : app->sceneManager->GetGameObjects())
/*for (const auto GO : app->sceneManager->GetGameObjects())
{
Camera* gameCam = GO.get()->GetComponent<Camera>();
if (gameCam != nullptr && gameCam->drawFrustum)
app->engine->DrawFrustum(gameCam->viewProjectionMatrix);
}
}*/
}

ImGui::End();
Expand Down
5 changes: 4 additions & 1 deletion TheOneEditor/Renderer3D.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,10 @@ bool Renderer3D::Start()
sceneCamera = std::make_shared<GameObject>("EDITOR CAMERA");
sceneCamera.get()->AddComponent<Transform>();
sceneCamera.get()->AddComponent<Camera>();
sceneCamera.get()->GetComponent<Transform>()->setPosition(vec3f(0, 2, -10));
sceneCamera.get()->GetComponent<Transform>()->setPosition(vec3f(0, 15, -70));
//hekbas check this
/*sceneCamera.get()->GetComponent<Camera>()->center = {0, 0, 0};
sceneCamera.get()->GetComponent<Camera>()->updateViewMatrix();*/

// hekbas test adding same component
LOG(LogType::LOG_INFO, "# Testing Component Duplication");
Expand Down
4 changes: 2 additions & 2 deletions TheOneEditor/SceneManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ bool SceneManager::Start()
rotationSpeed = 30.0f;

std::shared_ptr<GameObject> gameCam = CreateCameraGO("Game Camera");
gameCam.get()->GetComponent<Camera>()->setPosition({ -10, 4, 0 });
gameCam.get()->GetComponent<Camera>()->setPosition({ -10, 8, 0 });

return true;
}
Expand All @@ -72,7 +72,7 @@ bool SceneManager::Update(double dt)


if (app->IsPlaying()) {
demo->GetComponent<Transform>()->rotate({ 1, 0, 0 }, rotationAngle);
demo->GetComponent<Transform>()->rotate({ 0, 1, 0 }, rotationAngle);

rotationAngle += rotationSpeed * dt;

Expand Down
22 changes: 11 additions & 11 deletions TheOneEditor/TheOneEditor.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -52,20 +52,20 @@
<ClCompile Include="Importer.cpp">
<Filter>Importers</Filter>
</ClCompile>
<ClCompile Include="Window.h">
<Filter>Modules</Filter>
</ClCompile>
<ClCompile Include="Input.cpp">
<Filter>Importers</Filter>
<Filter>Modules</Filter>
</ClCompile>
<ClCompile Include="Renderer3D.cpp">
<Filter>Importers</Filter>
<Filter>Modules</Filter>
</ClCompile>
<ClCompile Include="SceneManager.cpp">
<Filter>Importers</Filter>
<Filter>Modules</Filter>
</ClCompile>
<ClCompile Include="Window.cpp">
<Filter>Importers</Filter>
</ClCompile>
<ClCompile Include="Window.h">
<Filter>Importers</Filter>
<Filter>Modules</Filter>
</ClCompile>
</ItemGroup>
<ItemGroup>
Expand Down Expand Up @@ -118,16 +118,16 @@
<Filter>Importers</Filter>
</ClInclude>
<ClInclude Include="Input.h">
<Filter>Importers</Filter>
<Filter>Modules</Filter>
</ClInclude>
<ClInclude Include="Module.h">
<Filter>Importers</Filter>
<Filter>Modules</Filter>
</ClInclude>
<ClInclude Include="Renderer3D.h">
<Filter>Importers</Filter>
<Filter>Modules</Filter>
</ClInclude>
<ClInclude Include="SceneManager.h">
<Filter>Importers</Filter>
<Filter>Modules</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
Expand Down
36 changes: 17 additions & 19 deletions TheOneEditor/imgui.ini
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,9 @@ DockId=0x00000006,0

[Window][Scene]
Pos=287,19
Size=677,745
Size=1254,745
Collapsed=0
DockId=0x00000008,0
DockId=0x00000009,0

[Window][Assets]
Pos=0,511
Expand Down Expand Up @@ -65,15 +65,15 @@ Size=481,105
Collapsed=0

[Window][Settings]
Pos=341,121
Pos=661,301
Size=597,298
Collapsed=0

[Window][Game]
Pos=966,19
Size=575,745
Pos=287,19
Size=1254,745
Collapsed=0
DockId=0x0000000D,0
DockId=0x00000009,1

[Table][0x8AACECBD,2]
RefScale=13
Expand All @@ -87,17 +87,15 @@ Column 2 Weight=1.0470
Column 3 Weight=1.0067

[Docking][Data]
DockSpace ID=0x09EF459F Window=0x9A404470 Pos=0,19 Size=1920,1061 Split=X
DockNode ID=0x00000007 Parent=0x09EF459F SizeRef=2181,701 Split=Y
DockNode ID=0x00000001 Parent=0x00000007 SizeRef=1280,143
DockNode ID=0x00000002 Parent=0x00000007 SizeRef=1280,575 Split=Y
DockNode ID=0x00000003 Parent=0x00000002 SizeRef=763,745 Split=X Selected=0xE192E354
DockNode ID=0x00000006 Parent=0x00000003 SizeRef=285,487 Selected=0x29EABFBD
DockNode ID=0x00000009 Parent=0x00000003 SizeRef=1894,487 Split=X Selected=0xE192E354
DockNode ID=0x00000008 Parent=0x00000009 SizeRef=677,735 CentralNode=1 Selected=0xE192E354
DockNode ID=0x0000000D Parent=0x00000009 SizeRef=575,735 Selected=0x26816F31
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=763,314 Split=X Selected=0xD04A4B96
DockNode ID=0x00000005 Parent=0x00000004 SizeRef=875,214 Selected=0xD04A4B96
DockNode ID=0x0000000A Parent=0x00000004 SizeRef=664,214 Selected=0x49278EEE
DockNode ID=0x0000000B Parent=0x09EF459F SizeRef=377,701 Selected=0xE7039252
DockSpace ID=0x09EF459F Window=0x9A404470 Pos=0,19 Size=1920,1061 Split=X
DockNode ID=0x00000007 Parent=0x09EF459F SizeRef=2181,701 Split=Y
DockNode ID=0x00000001 Parent=0x00000007 SizeRef=1280,143
DockNode ID=0x00000002 Parent=0x00000007 SizeRef=1280,575 Split=Y
DockNode ID=0x00000003 Parent=0x00000002 SizeRef=763,745 Split=X Selected=0xE192E354
DockNode ID=0x00000006 Parent=0x00000003 SizeRef=285,487 Selected=0x29EABFBD
DockNode ID=0x00000009 Parent=0x00000003 SizeRef=1894,487 CentralNode=1 Selected=0xE192E354
DockNode ID=0x00000004 Parent=0x00000002 SizeRef=763,314 Split=X Selected=0xD04A4B96
DockNode ID=0x00000005 Parent=0x00000004 SizeRef=875,214 Selected=0xD04A4B96
DockNode ID=0x0000000A Parent=0x00000004 SizeRef=664,214 Selected=0x49278EEE
DockNode ID=0x0000000B Parent=0x09EF459F SizeRef=377,701 Selected=0xE7039252

0 comments on commit 72886f4

Please sign in to comment.