184 bool FileExists(
const std::string& path)
const;
ComponentTypeID GetComponentTypeID_Static()
Centralized ImGui modal dialog for file saving across all editors.
void Close()
Closes the modal without confirming changes.
void RenderActionButtons()
Renders action buttons (Save/Cancel).
void RenderFolderList()
Renders folder navigation.
std::string GetModalTitle() const
Returns a description of this file type for the modal title.
std::string GetDefaultDirectory() const
Returns the default directory for this file type.
SaveFileType GetFileType() const
Returns the file type this modal handles.
const std::string & GetSelectedFile() const
Returns the selected file path with extension (only valid if IsConfirmed() is true).
std::vector< std::string > m_fileList
Files in current directory.
bool m_showOverwriteConfirm
Show overwrite confirmation dialog.
std::string GetDescriptionText() const
Returns user-friendly description text.
bool IsOpen() const
Returns true if modal is currently visible.
std::string m_currentPath
Current directory.
void RefreshFileList()
Refreshes the file and folder lists for the current directory.
void Open(const std::string &directory, const std::string &suggestedFilename="")
Opens the modal with initial directory and filename.
std::vector< std::string > m_folderList
Folders in current directory.
void RenderOverwriteConfirmation()
Renders the overwrite confirmation dialog.
char m_pathBuffer[512]
Path input text buffer.
SaveFileType m_fileType
Type of file to save.
void RenderFileList()
Renders the file list in the modal.
char m_filenameBuffer[256]
Filename input (without extension)
std::string m_selectedFile
Full path with extension.
bool m_confirmed
Did user click Save.
bool IsConfirmed() const
Returns true if user clicked "Save" button.
void Render()
Renders the modal UI.
~SaveFilePickerModal()=default
void RenderFilenameInput()
Renders filename input and extension display.
std::string GetFileExtension() const
Returns the file extension for this file type (e.g., ".bt.json").
bool m_isOpen
Is modal currently visible.
bool FileExists(const std::string &path) const
Checks if a file exists at the given path.
< Provides AssetID and INVALID_ASSET_ID
@ Audio
Future: .ogg, .wav files.
@ BehaviorTree
.bt.json files in ./Gamedata
SaveFileType
Supported file types for the centralized save modal.
@ Blueprint
.ats files (SubGraph/VisualScript)