Example #1
0
        public TileEditor(MapEditor ownerForm, TileUpdater updater, Tile tile, byte[] graphics)
        {
            this.ownerForm  = ownerForm;
            this.updater    = updater;
            this.tile       = tile;
            this.tileBackup = tile.Copy();
            this.graphics   = graphics;

            // Initialization
            InitializeComponent();
            CreateHelperForms();
            CreateShortcuts();
            LoadTileProperties();

            // Initialize history logging
            this.History = new History(this);
        }
Example #2
0
        // Constructors
        /// <summary>
        /// View and edit the properties of a single 16x16 tile.
        /// </summary>
        /// <param name="updateFunction">The update function to invoke when "APPLY" is clicked.</param>
        /// <param name="tile">The 16x16 tile to analyze.</param>
        /// <param name="graphics">The graphics used by the tile.</param>
        /// <param name="paletteSet">The palette set used by the tile.</param>
        /// <param name="format">Either 0x10 or 0x20 for 2bpp or 4bpp format, respectively.</param>
        /// <param name="sender">The control that was double-clicked to open the tile editor.</param>
        public TileEditor(MapEditor ownerForm, TileUpdater updater, Tile tile, byte[] graphics, bool disableattr)
        {
            this.ownerForm  = ownerForm;
            this.updater    = updater;
            this.tile       = tile;
            this.tileBackup = tile.Copy();
            this.graphics   = graphics;

            // Initialization
            InitializeComponent();
            CreateHelperForms();
            CreateShortcuts();
            LoadTileProperties();

            // Enable/disable status editing
            subtileStatus.Enabled = !disableattr;

            // Initialize history logging
            this.History = new History(this);
        }