Fixes
This commit is contained in:
@ -14,6 +14,7 @@
|
||||
// You should have received a copy of the GNU General Public License
|
||||
// along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
#include <Editor.hpp>
|
||||
#include <UI/View/AssetBrowser.hpp>
|
||||
|
||||
namespace ia::iae
|
||||
@ -51,8 +52,15 @@ namespace ia::iae
|
||||
for (const auto &t : m_assetDirectoryFiles)
|
||||
{
|
||||
ImGui::SetCursorPosY(ImGui::GetCursorPosY() + 1.75f);
|
||||
if (ImGui::Selectable(t.IconAndName.c_str()) && t.IsDirectory)
|
||||
ChangeCurrentOpenDirectory(t.Path);
|
||||
if (ImGui::Selectable(t.IconAndName.c_str()))
|
||||
{
|
||||
if (t.IsDirectory)
|
||||
{
|
||||
ChangeCurrentOpenDirectory(t.Path);
|
||||
break;
|
||||
}
|
||||
OpenAsset(t.Path);
|
||||
}
|
||||
}
|
||||
}
|
||||
ImGui::EndChild();
|
||||
@ -84,6 +92,14 @@ namespace ia::iae
|
||||
PostRender();
|
||||
}
|
||||
|
||||
VOID View_AssetBrowser::Update()
|
||||
{
|
||||
}
|
||||
|
||||
VOID View_AssetBrowser::OnEvent(IN SDL_Event *event)
|
||||
{
|
||||
}
|
||||
|
||||
VOID View_AssetBrowser::ChangeCurrentOpenDirectory(IN CONST std::filesystem::path &path)
|
||||
{
|
||||
m_currentOpenDirectoryPath = path;
|
||||
@ -131,6 +147,6 @@ namespace ia::iae
|
||||
|
||||
VOID View_AssetBrowser::OpenAsset(IN CONST std::filesystem::path &path)
|
||||
{
|
||||
|
||||
Editor::Instance().OpenAsset(path);
|
||||
}
|
||||
} // namespace ia::iae
|
||||
Reference in New Issue
Block a user