Olympe Engine 2.0
2D Game Engine with ECS Architecture
Loading...
Searching...
No Matches
Public Member Functions | Private Member Functions | Private Attributes | List of all members
Olympe::AssetBrowser Class Reference

#include <AssetBrowser.h>

+ Collaboration diagram for Olympe::AssetBrowser:

Public Member Functions

 AssetBrowser ()
 
 ~AssetBrowser ()
 
void Initialize (const std::string &assetsRootPath)
 
void Refresh ()
 
void Render ()
 
std::string GetSelectedAssetPath () const
 
bool HasSelection () const
 
void SetAssetOpenCallback (std::function< void(const std::string &)> callback)
 

Private Member Functions

void RenderTreeNode (const std::shared_ptr< AssetNode > &node)
 
void RenderRuntimeEntities ()
 
void RenderNodePalette ()
 
bool PassesFilter (const std::shared_ptr< AssetNode > &node) const
 
void RenderFilterUI ()
 

Private Attributes

std::string m_SelectedAssetPath
 
AssetFilter m_Filter
 
std::function< void(const std::string &)> m_OnAssetOpen
 
char m_SearchBuffer [256]
 
int m_TypeFilterSelection
 
std::vector< std::string > m_AvailableTypes
 

Detailed Description

Definition at line 28 of file AssetBrowser.h.

Constructor & Destructor Documentation

◆ AssetBrowser()

Olympe::AssetBrowser::AssetBrowser ( )

Definition at line 16 of file AssetBrowser.cpp.

References m_AvailableTypes, and m_SearchBuffer.

◆ ~AssetBrowser()

Olympe::AssetBrowser::~AssetBrowser ( )

Definition at line 23 of file AssetBrowser.cpp.

Member Function Documentation

◆ GetSelectedAssetPath()

std::string Olympe::AssetBrowser::GetSelectedAssetPath ( ) const

Definition at line 498 of file AssetBrowser.cpp.

References m_SelectedAssetPath.

◆ HasSelection()

bool Olympe::AssetBrowser::HasSelection ( ) const

Definition at line 503 of file AssetBrowser.cpp.

References m_SelectedAssetPath.

◆ Initialize()

void Olympe::AssetBrowser::Initialize ( const std::string &  assetsRootPath)

Definition at line 27 of file AssetBrowser.cpp.

References Olympe::BlueprintEditor::Get(), GetComponentTypeID_Static(), and Olympe::BlueprintEditor::SetAssetRootPath().

Referenced by Olympe::BlueprintEditorGUI::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ PassesFilter()

bool Olympe::AssetBrowser::PassesFilter ( const std::shared_ptr< AssetNode > &  node) const
private

Definition at line 43 of file AssetBrowser.cpp.

References GetComponentTypeID_Static(), m_AvailableTypes, m_Filter, m_TypeFilterSelection, and Olympe::AssetFilter::searchQuery.

Referenced by RenderTreeNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Refresh()

void Olympe::AssetBrowser::Refresh ( )

Definition at line 35 of file AssetBrowser.cpp.

References Olympe::BlueprintEditor::Get(), and Olympe::BlueprintEditor::RefreshAssets().

Referenced by RenderFilterUI().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Render()

void Olympe::AssetBrowser::Render ( )

◆ RenderFilterUI()

void Olympe::AssetBrowser::RenderFilterUI ( )
private

Definition at line 70 of file AssetBrowser.cpp.

References GetComponentTypeID_Static(), m_AvailableTypes, m_Filter, m_SearchBuffer, m_TypeFilterSelection, Refresh(), and Olympe::AssetFilter::searchQuery.

Referenced by Render().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ RenderNodePalette()

void Olympe::AssetBrowser::RenderNodePalette ( )
private

◆ RenderRuntimeEntities()

void Olympe::AssetBrowser::RenderRuntimeEntities ( )
private

◆ RenderTreeNode()

void Olympe::AssetBrowser::RenderTreeNode ( const std::shared_ptr< AssetNode > &  node)
private

Definition at line 109 of file AssetBrowser.cpp.

References Olympe::BlueprintEditor::Get(), GetComponentTypeID_Static(), m_OnAssetOpen, m_SelectedAssetPath, Olympe::BlueprintEditor::OpenGraphInEditor(), PassesFilter(), RenderTreeNode(), and Olympe::BlueprintEditor::SelectAsset().

Referenced by Render(), and RenderTreeNode().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ SetAssetOpenCallback()

void Olympe::AssetBrowser::SetAssetOpenCallback ( std::function< void(const std::string &)>  callback)

Definition at line 508 of file AssetBrowser.cpp.

References GetComponentTypeID_Static(), and m_OnAssetOpen.

Referenced by Olympe::BlueprintEditorGUI::Initialize().

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ m_AvailableTypes

std::vector<std::string> Olympe::AssetBrowser::m_AvailableTypes
private

Definition at line 76 of file AssetBrowser.h.

Referenced by AssetBrowser(), PassesFilter(), and RenderFilterUI().

◆ m_Filter

AssetFilter Olympe::AssetBrowser::m_Filter
private

Definition at line 70 of file AssetBrowser.h.

Referenced by PassesFilter(), and RenderFilterUI().

◆ m_OnAssetOpen

std::function<void(const std::string&)> Olympe::AssetBrowser::m_OnAssetOpen
private

Definition at line 71 of file AssetBrowser.h.

Referenced by RenderTreeNode(), and SetAssetOpenCallback().

◆ m_SearchBuffer

char Olympe::AssetBrowser::m_SearchBuffer[256]
private

Definition at line 74 of file AssetBrowser.h.

Referenced by AssetBrowser(), and RenderFilterUI().

◆ m_SelectedAssetPath

std::string Olympe::AssetBrowser::m_SelectedAssetPath
private

Definition at line 69 of file AssetBrowser.h.

Referenced by GetSelectedAssetPath(), HasSelection(), and RenderTreeNode().

◆ m_TypeFilterSelection

int Olympe::AssetBrowser::m_TypeFilterSelection
private

Definition at line 75 of file AssetBrowser.h.

Referenced by PassesFilter(), and RenderFilterUI().


The documentation for this class was generated from the following files: