feat: Integrate ProjectFileEditor into EditorManager for enhanced project file handling

- Initialized ProjectFileEditor within EditorManager to facilitate project file editing.
- Added menu options for editing project files, including loading and error handling with toast notifications.
- Updated the DrawMenuBar method to render the ProjectFileEditor interface.
- Included necessary header for ProjectFileEditor in editor_manager.h.
This commit is contained in:
scawful
2025-10-04 21:47:55 -04:00
parent 9b51cd09f6
commit a057d0707a
5 changed files with 28 additions and 3 deletions

View File

@@ -25,7 +25,7 @@ void ProjectFileEditor::Draw() {
ImGui::SetNextWindowSize(ImVec2(900, 700), ImGuiCond_FirstUseEver);
if (!ImGui::Begin(absl::StrFormat("%s Project Editor###ProjectFileEditor",
ICON_MD_EDIT_DOCUMENT).c_str(),
ICON_MD_DESCRIPTION).c_str(),
&active_)) {
ImGui::End();
return;
@@ -239,7 +239,7 @@ void ProjectFileEditor::ValidateContent() {
for (const auto& line : lines) {
line_num++;
std::string trimmed = absl::StripAsciiWhitespace(line);
std::string trimmed = std::string(absl::StripAsciiWhitespace(line));
// Skip empty lines and comments
if (trimmed.empty() || trimmed[0] == '#') continue;