Ejemplo n.º 1
0
        private void editWarpToolStripMenuItem_Click(object sender, EventArgs e)
        {
            Warp     warp     = map.GetWarp(editPos.X, editPos.Y);
            FormWarp formWarp = new FormWarp(warp);

            if (formWarp.ShowDialog() == DialogResult.OK)
            {
                changeFlag  = true;
                warp.Offset = formWarp.Offset;
                warp.Map    = formWarp.MapNum;
                warp.X      = formWarp.X;
                warp.Y      = formWarp.Y;
                picMap.Refresh();
            }
        }
Ejemplo n.º 2
0
 private void addWarpToolStripMenuItem_Click(object sender, EventArgs e)
 {
     if (map.NumWarps < Map.MAX_WARPS)
     {
         Warp warp = new Warp();
         warp.Offset = Map.CalcOffset(editPos.X, editPos.Y);
         FormWarp formWarp = new FormWarp(warp);
         if (formWarp.ShowDialog() == DialogResult.OK)
         {
             changeFlag  = true;
             warp.Offset = formWarp.Offset;
             warp.Map    = formWarp.MapNum;
             warp.X      = formWarp.X;
             warp.Y      = formWarp.Y;
             map.AddWarp(warp);
             picMap.Refresh();
         }
     }
     else
     {
         MessageBox.Show("Maximum number of warps reached on this screen!", "", MessageBoxButtons.OK);
     }
 }