-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathAssetExplorer.cpp
More file actions
35 lines (29 loc) · 804 Bytes
/
Copy pathAssetExplorer.cpp
File metadata and controls
35 lines (29 loc) · 804 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
#include "UI/AssetExplorer.h"
#include "EditorWorld.h"
#include "Render/Renderer.h"
#include "Game/ImGUImpl.h"
#include "Window/Window.h"
#include <fmt/core.h>
namespace sh::editor
{
AssetExplorer::AssetExplorer(const EditorWorld& world) :
world(world)
{
}
SH_EDITOR_API void AssetExplorer::SetAssetType(AssetType type)
{
this->type = type;
}
SH_EDITOR_API void AssetExplorer::Update()
{
}
SH_EDITOR_API void AssetExplorer::Render()
{
float width = world.renderer.GetWindow().GetWidth() / 2.f;
float height = world.renderer.GetWindow().GetHeight() / 2.f;
ImGui::SetNextWindowSize(ImVec2{ width, height }, ImGuiCond_::ImGuiCond_Appearing);
ImGui::Begin(fmt::format("AssetExplorer{}", static_cast<int>(type)).c_str());
ImGui::Text("Hello");
ImGui::End();
}
}//namespace