コード例 #1
0
        private void TsbRename_Click(object sender, EventArgs e)
        {
            InputForm iForm = new InputForm();

            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner         = ReubenController.MainWindow;

            string name = iForm.GetInput("Please enter a new name");

            if (name != null)
            {
                switch (SelectionType)
                {
                case SelectionType.Level:
                    SelectedLevel.Name = name;
                    LevelToNodes[SelectedLevel.LevelGuid].Text = name;
                    break;

                case SelectionType.World:
                    SelectedWorld.Name = name;
                    WorldToNodes[SelectedWorld.WorldGuid].Text = name;
                    break;
                }
            }
        }
コード例 #2
0
 public static void CreateNewProject()
 {
     InputForm iForm = new InputForm();
     string projectName = iForm.GetInput("Please enter the name of your project");
     if (projectName != null)
     {
         CurrentProject = ProjectManager.CreateNewProject(projectName);
     }
 }
コード例 #3
0
        public static void CreateNewProject()
        {
            InputForm iForm       = new InputForm();
            string    projectName = iForm.GetInput("Please enter the name of your project");

            if (projectName != null)
            {
                CurrentProject = ProjectManager.CreateNewProject(projectName);
            }
        }
コード例 #4
0
        private void BtnAdd_Click(object sender, EventArgs e)
        {
            InputForm iForm   = new InputForm();
            string    newName = iForm.GetInput("Please enter the name of the layout");

            if (newName != null)
            {
                ProjectController.LayoutManager.CreateNewLayout(newName);
            }
        }
コード例 #5
0
        private void BtnRename_Click(object sender, EventArgs e)
        {
            InputForm iForm = new InputForm();

            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner         = ReubenController.MainWindow;

            string newName = iForm.GetInput("Please enter the name of the layout");

            if (newName != null)
            {
                (CmbLayouts.SelectedItem as BlockLayout).Name = newName;
            }
        }
コード例 #6
0
        private void BtnRename_Click(object sender, EventArgs e)
        {
            InputForm iForm = new InputForm();

            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner         = ReubenController.MainWindow;

            string newName = iForm.GetInput("Enter a name for this palette");

            if (newName != null)
            {
                (CmbPalettes.SelectedItem as PaletteInfo).Name = newName;
            }
        }
コード例 #7
0
        public static void CreateNewWorld()
        {
            InputForm iForm = new InputForm();
            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner = ReubenController.MainWindow;

            string name = iForm.GetInput("Please enter a world name.");
            if (name != null)
            {
                WorldInfo wi = new WorldInfo();
                wi.WorldGuid = Guid.NewGuid();
                wi.Name = name;
                ProjectController.WorldManager.AddWorld(wi);
            }
        }
コード例 #8
0
        public static void CreateNewWorld()
        {
            InputForm iForm = new InputForm();

            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner         = ReubenController.MainWindow;

            string name = iForm.GetInput("Please enter a world name.");

            if (name != null)
            {
                WorldInfo wi = new WorldInfo();
                wi.WorldGuid = Guid.NewGuid();
                wi.Name      = name;
                ProjectController.WorldManager.AddWorld(wi);
            }
        }
コード例 #9
0
        public static bool CreateNewProject()
        {
            InputForm iForm = new InputForm();
            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner = ReubenController.MainWindow;

            string projectName = iForm.GetInput("Please enter the name of your project");
            if (projectName != null)
            {
                SaveFileDialog SFD = new SaveFileDialog();
                SFD.InitialDirectory = ProjectController.ReubenDirectory;
                SFD.FileName = projectName + ".rbn";
                DialogResult result = SFD.ShowDialog();
                if (result == DialogResult.OK)
                {
                    return ProjectController.CreateNewProject(SFD.FileName, projectName);
                }
            }

            return false;
        }
コード例 #10
0
ファイル: Main.cs プロジェクト: bonimy/reuben-smb3-1
        private void globalObjectReplaceToolStripMenuItem_Click(object sender, EventArgs e)
        {
            InputForm iForm = new InputForm();

            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner         = ReubenController.MainWindow;

            string originalObjectId = iForm.GetInput("Enter the object ID to search for.");

            if (originalObjectId == null)
            {
                return;
            }


            string replaceObjectId = iForm.GetInput("Enter the object ID to replace #" + originalObjectId + " with.");

            if (replaceObjectId == null)
            {
                return;
            }

            foreach (LevelInfo levelInfo in ProjectController.LevelManager.Levels)
            {
                Level level = new Level();
                level.Load(levelInfo);
                for (int i = 0; i < level.SpriteData.Count; i++)
                {
                    if (level.SpriteData[i].InGameID == originalObjectId.ToIntFromHex() &&
                        !level.SpriteData[i].Replaced)
                    {
                        level.SpriteData[i].InGameID = replaceObjectId.ToIntFromHex();
                        level.SpriteData[i].Replaced = true;
                    }
                }

                level.Save();
            }
        }
コード例 #11
0
        public static bool CreateNewProject()
        {
            InputForm iForm = new InputForm();

            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner         = ReubenController.MainWindow;

            string projectName = iForm.GetInput("Please enter the name of your project");

            if (projectName != null)
            {
                SaveFileDialog SFD = new SaveFileDialog();
                SFD.InitialDirectory = ProjectController.ReubenDirectory;
                SFD.FileName         = projectName + ".rbn";
                DialogResult result = SFD.ShowDialog();
                if (result == DialogResult.OK)
                {
                    return(ProjectController.CreateNewProject(SFD.FileName, projectName));
                }
            }

            return(false);
        }
コード例 #12
0
        private void BtnRename_Click(object sender, EventArgs e)
        {
            InputForm iForm = new InputForm();
            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner = ReubenController.MainWindow;

            string newName = iForm.GetInput("Enter a name for this palette");
            if (newName != null)
            {
                (CmbPalettes.SelectedItem as PaletteInfo).Name = newName;
            }
        }
コード例 #13
0
ファイル: ProjectView.cs プロジェクト: AbuSLmLm/reuben-smb3
        private void TsbRename_Click(object sender, EventArgs e)
        {
            InputForm iForm = new InputForm();
            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner = ReubenController.MainWindow;

            string name = iForm.GetInput("Please enter a new name");
            if (name != null)
            {
                switch (SelectionType)
                {
                    case SelectionType.Level:
                        SelectedLevel.Name = name;
                        LevelToNodes[SelectedLevel.LevelGuid].Text = name;
                        break;

                    case SelectionType.World:
                        SelectedWorld.Name = name;
                        WorldToNodes[SelectedWorld.WorldGuid].Text = name;
                        break;
                }
            }
        }
コード例 #14
0
ファイル: LayoutEditor.cs プロジェクト: AbuSLmLm/reuben-smb3
        private void BtnRename_Click(object sender, EventArgs e)
        {
            InputForm iForm = new InputForm();
            iForm.StartPosition = FormStartPosition.CenterParent;
            iForm.Owner = ReubenController.MainWindow;

            string newName = iForm.GetInput("Please enter the name of the layout");
            if (newName != null)
            {
                (CmbLayouts.SelectedItem as BlockLayout).Name = newName;
            }
        }
コード例 #15
0
ファイル: LayoutEditor.cs プロジェクト: AbuSLmLm/reuben-smb3
 private void BtnAdd_Click(object sender, EventArgs e)
 {
     InputForm iForm = new InputForm();
     string newName = iForm.GetInput("Please enter the name of the layout");
     if (newName != null)
     {
         ProjectController.LayoutManager.CreateNewLayout(newName);
     }
 }