Source code for simvx.editor.main
"""Editor Main — Entry point for the SimVX game editor.
Delegates to ``app.EditorShell`` for the actual UI. This module exists
for backward compatibility and as the ``simvx-editor`` console script target.
"""
from __future__ import annotations
from .app import EditorShell, launch
# Backward-compat alias — existing code importing EditorRoot still works.
EditorRoot = EditorShell
[docs]
def main():
"""Editor entry point — launched via ``simvx-editor`` command."""
import argparse
parser = argparse.ArgumentParser(description="SimVX Editor")
parser.add_argument("--project", type=str, default=None, help="Open project directly, skip welcome screen")
parser.add_argument("--backend", type=str, default=None, choices=["glfw", "sdl3"], help="Windowing backend")
args = parser.parse_args()
launch(project_path=args.project, backend=args.backend)
if __name__ == "__main__":
main()