コード例 #1
0
 public TilesetSelectionChangedEventArgs(ContentRef<Tileset> prev, ContentRef<Tileset> next, SelectionChangeReason reason)
     : base()
 {
     this.prev = prev;
     this.next = next;
     this.reason = reason;
 }
コード例 #2
0
        public SelectionChangedEventArgs(ObjectSelection current, ObjectSelection previous, ObjectSelection.Category changedCategoryFallback, SelectionChangeReason reason)
        {
            this.current = current;
            this.previous = previous;
            this.reason = reason;

            this.diffCat = ObjectSelection.GetAffectedCategories(this.previous, this.current);
            if (this.diffCat == ObjectSelection.Category.None) this.diffCat = changedCategoryFallback;
            this.added = this.current - this.previous;
            this.removed = this.previous - this.current;
        }
コード例 #3
0
        public SelectionChangedEventArgs(ObjectSelection current, ObjectSelection previous, ObjectSelection.Category changedCategoryFallback, SelectionChangeReason reason)
        {
            this.current  = current;
            this.previous = previous;
            this.reason   = reason;

            this.diffCat = ObjectSelection.GetAffectedCategories(this.previous, this.current);
            if (this.diffCat == ObjectSelection.Category.None)
            {
                this.diffCat = changedCategoryFallback;
            }
            this.added   = this.current - this.previous;
            this.removed = this.previous - this.current;
        }
コード例 #4
0
ファイル: TilesetEditor.cs プロジェクト: rolane/duality
        private void ApplyGlobalTilesetSelection(SelectionChangeReason changeReason)
        {
            Tileset tileset = TilemapsEditorSelectionParser.QuerySelectedTileset().Res;

            if (this.tilesetView.TargetTileset != tileset)
            {
                TilesetSelectionChangedEventArgs args = new TilesetSelectionChangedEventArgs(
                    this.tilesetView.TargetTileset,
                    tileset,
                    changeReason);
                this.OnTilesetSelectionChanging(args);
                this.tilesetView.TargetTileset = tileset;
                this.OnTilesetSelectionChanged(args);
            }
        }
コード例 #5
0
ファイル: TilesetEditor.cs プロジェクト: SirePi/duality
 private void ApplyGlobalTilesetSelection(SelectionChangeReason changeReason)
 {
     Tileset tileset = TilemapsEditorSelectionParser.QuerySelectedTileset().Res;
     if (this.tilesetView.TargetTileset != tileset)
     {
         TilesetSelectionChangedEventArgs args = new TilesetSelectionChangedEventArgs(
             this.tilesetView.TargetTileset,
             tileset,
             changeReason);
         this.OnTilesetSelectionChanging(args);
         this.tilesetView.TargetTileset = tileset;
         this.OnTilesetSelectionChanged(args);
     }
 }
コード例 #6
0
 public TilesetSelectionChangedEventArgs(ContentRef <Tileset> prev, ContentRef <Tileset> next, SelectionChangeReason reason) : base()
 {
     this.prev   = prev;
     this.next   = next;
     this.reason = reason;
 }