71 void Open(
const std::string& currentPath =
"");
ComponentTypeID GetComponentTypeID_Static()
Centralized ImGui modal dialog for file selection across all editors.
std::vector< std::string > GetFilteredFiles() const
Filters and returns files matching the search buffer.
char m_searchBuffer[128]
Search filter text buffer.
void RenderActionButtons()
Renders the action buttons (Select, Cancel).
const std::string & GetSelectedFile() const
Returns the selected file path (only valid if IsConfirmed() is true).
std::string m_selectedFile
Full path to selected file.
void Close()
Closes the modal without confirming changes.
std::string m_currentFilter
Current file extension filter.
bool m_isOpen
Is modal currently visible.
int m_selectedIndex
Currently highlighted file (-1 = none)
void RenderFileList()
Renders the file list UI component with scrolling and selection.
std::string GetModalTitle() const
Returns the modal title for this file type (e.g., "Select BehaviorTree File").
bool m_confirmed
Did user click Select.
void Open(const std::string ¤tPath="")
Opens the modal with optional initial path.
void Render()
Renders the modal UI.
std::vector< std::string > m_fileList
Files found in current directory.
std::string GetFilePattern() const
Returns the file pattern for this file type (e.g., "*.bt.json").
FilePickerType GetFileType() const
Returns the file type this modal handles.
int m_selectedFilterIndex
Current filter type (0=default, 1=.bt.json, etc.)
bool IsOpen() const
Returns true if modal is currently visible.
std::string GetDefaultDirectory() const
Returns the default directory for this file type.
std::vector< std::string > m_folderList
Folders in current directory.
FilePickerType m_fileType
Type of files to browse.
std::string GetDescriptionText() const
Returns the description text for this file type.
~FilePickerModal()=default
bool IsConfirmed() const
Returns true if user clicked "Select" button.
std::string m_currentPath
Current directory being browsed.
char m_pathBuffer[512]
Path input text buffer.
void RefreshFileList()
Refreshes file list from current directory.
< Provides AssetID and INVALID_ASSET_ID
FilePickerType
Supported file types for the centralized file picker modal.
@ Tileset
Future: .tsj tileset files.
@ Audio
Future: .ogg, .wav files.
@ BehaviorTree
.bt.json files in ./Gamedata
@ SubGraph
Teal — SubGraph call.