Yoga layout working

This commit is contained in:
Antoine Pilote
2021-05-31 23:03:29 -04:00
parent 0db30d7379
commit 39aaa4cd2c
16 changed files with 605 additions and 117 deletions

View File

@@ -143,12 +143,20 @@ void Scene::Update(Timestep ts)
auto [transform, rb] = ccGroup.get<TransformComponent, CharacterControllerComponent>(e);
rb.SyncWithTransform(m_Registry.get<TransformComponent>(e));
}
}
void Scene::EditorUpdate(Timestep ts)
{
m_EditorCamera->Update(ts);
for (auto i : m_Interfaces)
{
//i->Calculate(1280,720);
}
}
@@ -209,6 +217,14 @@ void Scene::DrawShadows()
}
}
void Scene::DrawInterface(Vector2 screensize)
{
for (auto i : m_Interfaces)
{
i->Draw(screensize);
}
}
void Scene::Draw()
{
@@ -339,10 +355,7 @@ void Scene::Draw()
PhysicsManager::Get()->DrawDebug();
}
for (auto i : m_Interfaces)
{
i->Draw();
}
}
void Scene::EditorDraw()
@@ -355,10 +368,7 @@ void Scene::EditorDraw()
// env->ProceduralSkybox->Draw(m_EditorCamera);
//}
for (auto i : m_Interfaces)
{
i->Draw();
}
@@ -510,10 +520,7 @@ void Scene::EditorDraw()
}
}*/
for (auto i : m_Interfaces)
{
i->Draw();
}
}
std::vector<Entity> Scene::GetAllEntities() {
@@ -619,6 +626,12 @@ bool Scene::SaveAs(const std::string& path)
return true;
}
void Scene::ReloadInterfaces()
{
for (auto& i : m_Interfaces)
i->Reload();
}
void Scene::AddInterface(Ref<UI::UserInterface> interface)
{
this->m_Interfaces.push_back(interface);