Ejemplo n.º 1
0
        public static void ShowWindow()
        {
            LevelEdit w = (LevelEdit)EditorWindow.GetWindowWithRect(typeof(LevelEdit), new Rect(0, 0, 780, 550), false, "LEVEL EDITOR");

            w.maxSize = new Vector2(780, 550);
            w.minSize = new Vector2(10, 10);
        }
Ejemplo n.º 2
0
        /// <summary>
        ///
        /// </summary>
        /// <param name="sender"></param>
        /// <param name="e"></param>
        private void loadButton_Click(object sender, EventArgs e)
        {
            OpenFileDialog open = new OpenFileDialog();

            open.Title  = "Open Map File";
            open.Filter = "Map Files|*.map";
            if (open.ShowDialog() == DialogResult.OK)
            {
                string    name   = open.FileName;
                LevelEdit editor = new LevelEdit(name);
                editor.ShowDialog();
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// if the height and width match the requirements, creates a new level editor
        /// </summary>
        /// <param name="sender">the object that sent the function</param>
        /// <param name="e">unused event argument variable</param>
        private void CreateButton_Click(object sender, EventArgs e)
        {
            LevelEdit editor = new LevelEdit();

            editor.ShowDialog();
        }