コード例 #1
0
ファイル: MainForm.cs プロジェクト: andreinitescu/cs_megaman
 private void pasteBrushToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (ActiveStage != null)
     {
         var brush = ActiveStage.Paste();
         if (brushForm != null && brush != null)
         {
             brushForm.AddBrush(brush);
         }
     }
 }
コード例 #2
0
ファイル: MainForm.cs プロジェクト: andreinitescu/cs_megaman
        private void pasteToolStripMenuItem_Click(object sender, EventArgs e)
        {
            if (ActiveStage != null)
            {
                var brush = ActiveStage.Paste();
                if (brush != null)
                {
                    CurrentBrush    = brush;
                    currentToolType = ToolType.Brush;
                    AssembleTool();
                    foreach (ToolStripButton item in toolBar.Items)
                    {
                        item.Checked = false;
                    }
                    brushToolButton.Checked = true;
                    DrawJoins = false;
                    DrawTiles = true;

                    // this is a bad hack to get it to draw immediately
                    Cursor.Position = new Point(Cursor.Position.X, Cursor.Position.Y + 1);
                    Cursor.Position = new Point(Cursor.Position.X, Cursor.Position.Y - 1);
                }
            }
        }