feat(editor): git integration for collaborative expansion development

- File > Project > Git submenu: Init, Commit, Push, Pull operations
- Init Git Repo: initializes git in the project directory with initial commit
- Commit Changes: auto-saves zone then commits all changes
- Push/Pull: sync with remote repositories for team collaboration
- Git Status: shows current repo state directly in the menu
- Teams can collaborate on custom expansions using standard git workflows
This commit is contained in:
Kelsi 2026-05-05 09:45:00 -07:00
parent 6f35081013
commit 94e6d5276e
3 changed files with 64 additions and 0 deletions

View file

@ -172,6 +172,27 @@ void EditorUI::renderMenuBar(EditorApp& app) {
}
ImGui::EndMenu();
}
ImGui::Separator();
if (ImGui::BeginMenu("Git (Collaboration)")) {
if (ImGui::MenuItem("Init Git Repo")) {
if (app.getProject().initGitRepo())
app.showToast("Git repo initialized");
else
app.showToast("Git init failed");
}
if (ImGui::MenuItem("Commit Changes")) {
app.quickSave();
if (app.getProject().gitCommit("Editor save"))
app.showToast("Changes committed");
}
if (ImGui::MenuItem("Push to Remote"))
app.getProject().gitPush() ? app.showToast("Pushed") : app.showToast("Push failed");
if (ImGui::MenuItem("Pull from Remote"))
app.getProject().gitPull() ? app.showToast("Pulled") : app.showToast("Pull failed");
ImGui::Separator();
ImGui::TextWrapped("%s", app.getProject().gitStatus().c_str());
ImGui::EndMenu();
}
ImGui::Text("Project: %s (%zu zones)",
app.getProject().name.c_str(),
app.getProject().zones.size());