public void CreateForms(Vector2 TopRightCorner) { foreach (Form form in MyForms) { Parent.RemoveForm(form); } MyForms.Clear(); CameraControls3D.Load(); int ButtonMargin = 0; int ButtonX = (int)TopRightCorner.X + ButtonMargin; int ButtonY = (int)TopRightCorner.Y + ButtonMargin; int Margin = 23; int ButtonSize = 16; ButtonX -= Margin; AddForm(new Button(SetRotate, CameraControls3D.RotateIcon, new Vector2(ButtonSize), new Vector2(ButtonX, ButtonY))); ButtonX -= Margin; AddForm(new Button(SetScale, CameraControls3D.ScaleIcon, new Vector2(ButtonSize), new Vector2(ButtonX, ButtonY))); ButtonX -= Margin; AddForm(new Button(SetMove, CameraControls3D.MoveIcon, new Vector2(ButtonSize), new Vector2(ButtonX, ButtonY))); ButtonX -= Margin; AddForm(new Button(Center, CameraControls3D.CenterIcon, new Vector2(ButtonSize), new Vector2(ButtonX, ButtonY))); ButtonX -= Margin; AddForm(new Button(Reset, CameraControls3D.ResetIcon, new Vector2(ButtonSize), new Vector2(ButtonX, ButtonY))); }
public override void Create() { MyCamera = new ObjectValue("Camera3D", typeof(Camera3DObject)); MyCamera.ChangeEvent = SetCamera; AddWindowForm(cameraControls = new CameraControls3D(this)); AddWindowForm(objectControls = new ObjectControls3D(this)); base.Create(); }