コード例 #1
0
        public MapEditorVM(IWorkspaceMan workspaceMan, MapsDataProvider mapsDataProvider, PalettesDataProvider palettesDataProvider, ActionSetsDataProvider actionSetsDataProvider, TileAtlasDataProvider tileAtlasDataProvider, IDialogProvider dialogProvider) : base(workspaceMan, dialogProvider)
        {
            Tools = new MapEditorToolsVM();

            TilesTool = new MapEditorTilesToolVM(this, workspaceMan);
            TilesTool.TilesSelector.ModelChangeAction = OnTileSetModelChange;
            UpdateTileSets = TilesTool.TileSetSelector.UpdateList;
            TilesTool.TileSetSelector.CurrentItemChanged += OnTileSetChanged;

            ActionsTool = new MapEditorActionsToolVM(this, workspaceMan);
            ActionsTool.ModelChangeAction = OnActionSetModelChange;

            PalettesTool   = new MapEditorPalettesToolVM(this);
            UpdatePalettes = PalettesTool.UpdateList;
            PalettesTool.ModelChangeAction = OnPalettesModelChange;

            var mapViewRenderTarget = new RenderTarget(1, 1);
            var renderer            = new ViewRenderer(this, mapViewRenderTarget);

            MapView = new MapEditorViewVM(this, renderer, mapViewRenderTarget);
            //LayoutVm = new MapLayoutVM(this);
            Properties = new LevelPropertiesVM(this);
            //LayoutVm.PropertyChanged += (s, e) => OnPropertyChanged(nameof(LayoutVm));

            InitializeTools();
            this.mapsDataProvider       = mapsDataProvider;
            this.palettesDataProvider   = palettesDataProvider;
            this.actionSetsDataProvider = actionSetsDataProvider;
            this.tileAtlasDataProvider  = tileAtlasDataProvider;
        }
コード例 #2
0
 public SpriteSetFromImageEditorVM(SpriteAtlasDataProvider spriteAtlasDataProvider,
                                   PalettesDataProvider palettesDataProvider,
                                   IModelsProvider dataProvider) : base(spriteAtlasDataProvider, palettesDataProvider, dataProvider)
 {
     SpriteEditor = new SpriteFromImageEditorVM(this);
     Items        = new BindingList <SpriteFromImageVM>();
 }
コード例 #3
0
        public TileSetFromBlkEditorVM(TileAtlasDataProvider tileSetsDataProvider,
                                      PalettesDataProvider palettesDataProvider)
        {
            PaletteIds = new BindingList <string>();
            this.tileSetsDataProvider = tileSetsDataProvider;
            this.palettesDataProvider = palettesDataProvider;

            Viewer = new TileSetViewerVM();
        }
コード例 #4
0
 public SpriteSetEditorExVM(SpriteAtlasDataProvider spriteAtlasDataProvider,
                            PalettesDataProvider palettesDataProvider,
                            IModelsProvider dataProvider)
 {
     this.spriteAtlasDataProvider = spriteAtlasDataProvider;
     this.palettesDataProvider    = palettesDataProvider;
     this.dataProvider            = dataProvider;
     PaletteIds = new BindingList <string>();
 }
コード例 #5
0
        public PaletteEditorExVM(PalettesDataProvider palettesDataProvider,
                                 IModelsProvider dataProvider)
        {
            this.palettesDataProvider = palettesDataProvider;
            this.dataProvider         = dataProvider;
            Colors = new BindingList <Color>();
            Initialize();

            Colors.ListChanged += (s, a) => OnPropertyChanged(nameof(Colors));
        }
コード例 #6
0
 public PaletteFromMapEditorVM(PalettesDataProvider palettesDataProvider,
                               IModelsProvider dataProvider) : base(palettesDataProvider, dataProvider)
 {
     BlockNames              = new BindingList <string>();
     BlockNames.ListChanged += (s, a) => OnPropertyChanged(nameof(BlockNames));
 }
コード例 #7
0
 public PaletteFromBinaryEditorVM(PalettesDataProvider palettesDataProvider,
                                  IModelsProvider dataProvider) : base(palettesDataProvider, dataProvider)
 {
 }
コード例 #8
0
 public SpriteSetFromSprEditorVM(SpriteAtlasDataProvider spriteSetsDataProvider,
                                 PalettesDataProvider palettesDataProvider,
                                 IModelsProvider dataProvider) : base(spriteSetsDataProvider, palettesDataProvider, dataProvider)
 {
     Items = new BindingList <SpriteVM>();
 }