public static DialogResult Show(IWin32Window Owner, Frame Frame) { NewHitboxDiaglog nfd = new NewHitboxDiaglog() { frame = Frame }; nfd.name.Text = "Hitbox" + Frame.HitBoxes.Count; nfd.autosel.Checked = AutoSelect; return(nfd.ShowDialog(Owner)); }
private void createHBClick(object sender, EventArgs e) { if (SelectedFrame == null) { MessageBox.Show("You must create a frame first.", "Error", MessageBoxButtons.OK, MessageBoxIcon.Error); return; } if (NewHitboxDiaglog.Show(ParentForm, SelectedFrame) == DialogResult.OK) { refreshHB(); HitBox h = selectedFrame.HitBoxes[SelectedFrame.HitBoxes.Count - 1]; h.BorderColor = borderC.BackColor; h.FrontColor = Color.FromArgb(120, fillC.BackColor); if (NewHitboxDiaglog.AutoSelect) { hbSelector.SelectedIndex = SelectedFrame.HitBoxes.Count - 1; } } }