Example #1
0
        private void ListAssetDirs_SelectedIndexChanged(object sender, System.EventArgs e)
        {
            if (null == project && listAssets.SelectedIndices.Count > 0)
            {
                return;
            }

            int index = listAssets.SelectedIndices[0];

            Model.Asset asset = project.Assets[index];
            if (asset == null)
            {
                return;
            }

            labelSelected.Text       = string.Format("[{0}]", asset.Name);
            groupSpriteAtlas.Enabled = true;
            groupBMFont.Enabled      = true;

            bool btnEnabled = asset.Atlas?.Sprites.Count > 0;

            btn_EditSprite.Enabled        = btnEnabled;
            btn_EditAnimation.Enabled     = btnEnabled;
            btn_ExportSpriteAtlas.Enabled = btnEnabled;
            btn_ExportBMFontAtlas.Enabled = btnEnabled;
        }
Example #2
0
        private void ListAssets_DoubleClick(object sender, EventArgs e)
        {
            if (null == project && listAssets.SelectedIndices.Count > 0)
            {
                return;
            }

            int index = listAssets.SelectedIndices[0];

            Model.Asset asset = project.Assets[index];
            System.Diagnostics.Process.Start(
                "explorer.exe",
                asset.Path
                );
        }
Example #3
0
        public void SetData(Model.Project project, Model.Asset asset)
        {
            if (project == null || asset == null)
            {
                Close();
                return;
            }

            this.project = project;
            this.asset   = asset;

            string        rootpath = project.MakeAbsolutePath(asset.Path);
            List <string> dirs     = GetLastDirs(rootpath, rootpath);

            this.dirs = dirs;

            lst_Frames.LargeImageList = new ImageList();
            foreach (Model.Sprite sprite in asset.Atlas.Sprites)
            {
                lst_Frames.LargeImageList.Images.Add(sprite.ImageName, sprite.Image);
            }

            RefreshList();
        }
Example #4
0
        public ASCIIForm()
        {
            InitializeComponent();

            Asset = new Model.Asset();
        }