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; } } }
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); } }
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); } }
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; } }
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; } }
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); } }
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; }
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(); } }
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); }