Skip to content

Commit

Permalink
update
Browse files Browse the repository at this point in the history
  • Loading branch information
T-rvw committed Nov 6, 2023
1 parent 73b9071 commit bdff1ff
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 3 deletions.
2 changes: 1 addition & 1 deletion Engine/Source/Editor/EditorApp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ void EditorApp::InitEditorUILayers()

auto pAssetBrowser = std::make_unique<AssetBrowser>("AssetBrowser");
pAssetBrowser->SetSceneRenderer(m_pSceneRenderer);
GetMainWindow()->OnDropFile.Bind<editor::AssetBrowser, &editor::AssetBrowser::ImportAssetFile>(pAssetBrowser.get());
OnDropFile.Bind<editor::AssetBrowser, &editor::AssetBrowser::ImportAssetFile>(pAssetBrowser.get());

m_pEditorImGuiContext->AddDynamicLayer(cd::MoveTemp(pAssetBrowser));
m_pEditorImGuiContext->AddDynamicLayer(std::make_unique<OutputLog>("OutputLog"));
Expand Down
3 changes: 3 additions & 0 deletions Engine/Source/Editor/EditorApp.h
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,9 @@ class EditorApp final : public engine::IApplication
engine::Renderer* m_pTerrainRenderer = nullptr;
engine::Renderer* m_pAABBRenderer = nullptr;

// Delegates
Delegate<void(const char*)> OnDropFile;

// Controllers for processing input events.
std::unique_ptr<engine::CameraController> m_pViewportCameraController;

Expand Down
1 change: 0 additions & 1 deletion Engine/Source/Runtime/Window/Window.h
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,6 @@ class Window

public:
// Delegates
Delegate<void(const char*)> OnDropFile;
MulticastDelegate<void(uint16_t, uint16_t)> OnResize;

private:
Expand Down
2 changes: 1 addition & 1 deletion Engine/Source/Runtime/Window/WindowManager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,7 @@ void WindowManager::Update()

case SDL_DROPFILE:
{
GetActiveWindow()->OnDropFile.Invoke(sdlEvent.drop.file);
OnDropFile.Invoke(sdlEvent.drop.file);
}
break;

Expand Down

0 comments on commit bdff1ff

Please sign in to comment.