public void Initialize(WireframeEditControl editControl, WireframeControl wireframeControl) { mWireframeControl = wireframeControl; mWireframeControl.AfterXnaInitialize += HandleAfterXnaIntiailize; mWireframeControl.KeyDown += HandleKeyPress; mEditControl = editControl; mEditControl.ZoomChanged += HandleControlZoomChange; }
public void Initialize(WireframeEditControl editControl, WireframeControl wireframeControl) { mWireframeControl = wireframeControl; mWireframeControl.AfterXnaInitialize += HandleAfterXnaIntiailize; mWireframeControl.KeyDown += HandleKeyPress; mEditControl = editControl; mEditControl.ZoomChanged += HandleControlZoomChange; gueManager = new GraphicalUiElementManager(); }
public void Initialize(WireframeEditControl editControl, WireframeControl wireframeControl, System.Windows.Forms.Cursor addCursor) { AddCursor = addCursor; mWireframeControl = wireframeControl; mWireframeControl.AfterXnaInitialize += HandleAfterXnaIntiailize; mWireframeControl.KeyDown += HandleKeyPress; mEditControl = editControl; mEditControl.ZoomChanged += HandleControlZoomChange; gueManager = new GraphicalUiElementManager(); }
private void CreateWireframeControl() { this.wireframeControl1 = new Gum.Wireframe.WireframeControl(); // // wireframeControl1 // this.wireframeControl1.AllowDrop = true; //this.wireframeControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) //| System.Windows.Forms.AnchorStyles.Left) //| System.Windows.Forms.AnchorStyles.Right))); this.wireframeControl1.Dock = DockStyle.Fill; this.wireframeControl1.ContextMenuStrip = this.WireframeContextMenuStrip; this.wireframeControl1.Cursor = System.Windows.Forms.Cursors.Default; this.wireframeControl1.DesiredFramesPerSecond = 30F; this.wireframeControl1.Location = new System.Drawing.Point(0, 52); this.wireframeControl1.Name = "wireframeControl1"; this.wireframeControl1.Size = new System.Drawing.Size(532, 452); this.wireframeControl1.TabIndex = 0; this.wireframeControl1.Text = "wireframeControl1"; this.wireframeControl1.DragDrop += new System.Windows.Forms.DragEventHandler(this.wireframeControl1_DragDrop); this.wireframeControl1.DragEnter += new System.Windows.Forms.DragEventHandler(this.wireframeControl1_DragEnter); this.wireframeControl1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.wireframeControl1_MouseClick); }
private void CreateWireframeControl() { this.wireframeControl1 = new Gum.Wireframe.WireframeControl(); // // wireframeControl1 // this.wireframeControl1.AllowDrop = true; //this.wireframeControl1.Anchor = ((System.Windows.Forms.AnchorStyles)((((System.Windows.Forms.AnchorStyles.Top | System.Windows.Forms.AnchorStyles.Bottom) //| System.Windows.Forms.AnchorStyles.Left) //| System.Windows.Forms.AnchorStyles.Right))); this.wireframeControl1.Dock = DockStyle.Fill; this.wireframeControl1.ContextMenuStrip = this.WireframeContextMenuStrip; this.wireframeControl1.Cursor = System.Windows.Forms.Cursors.Default; this.wireframeControl1.DesiredFramesPerSecond = 30F; this.wireframeControl1.Location = new System.Drawing.Point(0, 52); this.wireframeControl1.Name = "wireframeControl1"; this.wireframeControl1.Size = new System.Drawing.Size(532, 452); this.wireframeControl1.TabIndex = 0; this.wireframeControl1.Text = "wireframeControl1"; this.wireframeControl1.DragDrop += DragDropManager.Self.HandleFileDragDrop; this.wireframeControl1.DragEnter += DragDropManager.Self.HandleFileDragEnter; this.wireframeControl1.DragOver += (sender, e) => { //this.DoDragDrop(e.Data, DragDropEffects.Move | DragDropEffects.Copy); //DragDropManager.Self.HandleDragOver(sender, e); }; wireframeControl1.ErrorOccurred += (exception) => Crashes.TrackError(exception); this.wireframeControl1.QueryContinueDrag += (sender, args) => { args.Action = DragAction.Continue; }; this.wireframeControl1.MouseClick += new System.Windows.Forms.MouseEventHandler(this.wireframeControl1_MouseClick); this.wireframeControl1.KeyDown += (o, args) => { if (args.KeyCode == Keys.Tab) { GumCommands.Self.GuiCommands.ToggleToolVisibility(); } }; gumEditorPanel = new Panel(); // place the scrollbars first so they are in front of everything scrollBarControlLogic = new ScrollBarControlLogic(gumEditorPanel, wireframeControl1); scrollBarControlLogic.SetDisplayedArea(800, 600); wireframeControl1.CameraChanged += () => { if (ProjectManager.Self.GumProjectSave != null) { scrollBarControlLogic.SetDisplayedArea( ProjectManager.Self.GumProjectSave.DefaultCanvasWidth, ProjectManager.Self.GumProjectSave.DefaultCanvasHeight); } else { scrollBarControlLogic.SetDisplayedArea(800, 600); } scrollBarControlLogic.UpdateScrollBars(); scrollBarControlLogic.UpdateScrollBarsToCameraPosition(); }; //... add it here, so it can be done after scroll bars and other controls gumEditorPanel.Controls.Add(this.wireframeControl1); }