private void SpriteEditor_Load(object sender, EventArgs e) { spriteEditorControl.ParentEditor = this; ZoomBox = new ZoomBox(); ZoomBox.SetToolStripButtomZoomIn(toolStripButtonZoomIn); ZoomBox.SetToolStripButtomZoomOut(toolStripButtonZoomOut); ZoomBox.SetToolStripButtomZoomNormal(toolStripButtonZoomNormal); if (spriteEditorControl.Sprite.SourceRectangle != null) { toolStripButtonUseFullTexture.Enabled = true; } if (this.Sprite.Material != null) { labelTextureName.Text = spriteEditorControl.Sprite.Material.ToString(); } LoadMaterialAreas(); // hack around designer bug that resize the control labelTextureName.Size = new Size(labelTextureName.Size.Width, 22); // load all the Blending Type values in the combo box for (int i = 0; i < (int)DrawingBlendingType.EnumSize; i++) { comboBoxBlendingType.Items.Add(((DrawingBlendingType)i).ToString()); } comboBoxBlendingType.SelectedIndex = (int)spriteEditorControl.Sprite.BlendingType; pictureBoxTint.BackColor = MilkshakeForm.GetGDIColor(spriteEditorControl.Sprite.Tint); _ignoreNumericUpDownEvent = true; numericUpDownTintRed.Value = spriteEditorControl.Sprite.Tint.R; numericUpDownTintGreen.Value = spriteEditorControl.Sprite.Tint.G; numericUpDownTintBlue.Value = spriteEditorControl.Sprite.Tint.B; textBoxColorHTML.Text = GetHTMLFromColor(Sprite.Tint); _ignoreNumericUpDownEvent = false; _ignoreNumericUpDownEvent = true; _ignoreNumericUpDownEvent = false; UpdateSourceRectangleControls(); }
private void TileGridEditor_Load(object sender, EventArgs e) { tileGridEditorControl.ParentEditor = this; ZoomBox = new ZoomBox(); ZoomBox.SetToolStripButtomZoomIn(toolStripButtonZoomIn); ZoomBox.SetToolStripButtomZoomOut(toolStripButtonZoomOut); ZoomBox.SetToolStripButtomZoomNormal(toolStripButtonZoomNormal); labelTextureName.Text = TileGrid.Material.ToString(); // load all the Blending Type values in the combo box for (int i = 0; i < (int)DrawingBlendingType.EnumSize; i++) { comboBoxBlendingType.Items.Add(((DrawingBlendingType)i).ToString()); } comboBoxBlendingType.SelectedIndex = (int)TileGrid.BlendingType; pictureBoxTint.BackColor = MilkshakeForm.GetGDIColor(TileGrid.Tint); _ignoreNumericUpDownEvent = true; numericUpDownTintRed.Value = TileGrid.Tint.R; numericUpDownTintGreen.Value = TileGrid.Tint.G; numericUpDownTintBlue.Value = TileGrid.Tint.B; _ignoreNumericUpDownEvent = false; trackBarOpacity.Value = (int)TileGrid.Tint.A; labelOpacity.Text = trackBarOpacity.Value.ToString(); checkBoxUseSafeBorder.Checked = TileGrid.UseTilingSafeBorders; textBoxTileWidth.Text = TileGrid.TileSize.X.ToString(CultureInfo.InvariantCulture); textBoxTileHeight.Text = TileGrid.TileSize.Y.ToString(CultureInfo.InvariantCulture); textBoxSizeCols.Text = TileGrid.TileCols.ToString(CultureInfo.InvariantCulture); textBoxSizeRows.Text = TileGrid.TileRows.ToString(CultureInfo.InvariantCulture); ApplyPaintModeSetting(); AdjustTableLayersColumnSize(); RefreshLayerTable(); }
public CompositeEntityEditor() { InitializeComponent(); this.treeViewSceneItems.ImageList = SquidEditorForm.Instance.imageListTreeview; InitializeSceneItemsTreeViewNodes(); compositeEntityEditorControl.ParentEditor = this; ZoomBox = new ZoomBox(); ZoomBox.Camera.Pivot = new Vector2(0.5f); ZoomBox.SetToolStripButtomZoomIn(toolStripButtonZoomIn); ZoomBox.SetToolStripButtomZoomOut(toolStripButtonZoomOut); ZoomBox.SetToolStripButtomZoomNormal(toolStripButtonZoomNormal); IgnoreBoneTransformSelectionEvent = false; tableKeyFrames.HeaderRenderer = new XPTable.Renderers.FlatHeaderRenderer(); tableBoneTransforms.HeaderRenderer = new XPTable.Renderers.FlatHeaderRenderer(); sceneItemPreviewControl.SceneItem = null; sceneItemPreviewCompositeAnimationPreview.SceneItem = null; sceneItemPreviewCompositeAnimationPreview.Camera.Zoom = new Vector2(0.4f); // clear the lists/table listViewAnimations.Clear(); tableBoneTransforms.TableModel.Rows.Clear(); tableKeyFrames.TableModel.Rows.Clear(); propertyGridCompositeBoneTransform.SelectedObject = null; _previewEntity = new CompositeEntity(); _previewEntity.Animations.Add(new CompositeAnimation(_previewEntity)); }
void GraphArea_RelayoutFinished(object sender, EventArgs e) { ZoomBox.ZoomToFill(); ZoomBox.Mode = GraphX.Controls.ZoomControlModes.Custom; foreach (var item in GraphArea.VertexList) { DragBehaviour.SetIsDragEnabled(item.Value, true); item.Value.EventOptions.PositionChangeNotification = true; } GraphArea.ShowAllEdgesLabels(); GraphArea.InvalidateVisual(); }
private void ParticleEffectEditor_Load(object sender, EventArgs e) { ZoomBox = new ZoomBox(); ZoomBox.SetToolStripButtomZoomIn(toolStripButtonZoomIn); ZoomBox.SetToolStripButtomZoomOut(toolStripButtonZoomOut); ZoomBox.SetToolStripButtomZoomNormal(toolStripButtonZoomNormal); ZoomBox.Camera.Pivot = new Vector2(0.5f); ZoomBox.Camera.IsPivotRelative = true; particleEffectControl.ParentEditor = this; particleEffectControl.InitializeParticleEffect(); UpdateParticleEffectTree(); particleEffectProperties.SelectedNode = particleEffectProperties.Nodes[0]; }
public MainWindow() { InitializeComponent(); VertexTool.Background = new SolidColorBrush(Colors.LightSlateGray); vm = new ViewModel(); DataContext = vm; edgeStart = false; GraphCanvas.Cursor = Cursors.Pen; ZoomBox.CenterContent(); Closing += MainWindow_Closing; }
private void TextItemEditor_Load(object sender, EventArgs e) { TextItemEditorControl.ParentEditor = this; ZoomBox = new ZoomBox(); ZoomBox.SetToolStripButtomZoomIn(toolStripButtonZoomIn); ZoomBox.SetToolStripButtomZoomOut(toolStripButtonZoomOut); ZoomBox.SetToolStripButtomZoomNormal(toolStripButtonZoomNormal); // hack around designer bug that resize the control labelTextureName.Size = new Size(labelTextureName.Size.Width, 22); pictureBoxTint.BackColor = SquidEditorForm.GetGDIColor(TextItemEditorControl.TextItem.Tint); _ignoreNumericUpDownEvent = true; numericUpDownTintRed.Value = TextItemEditorControl.TextItem.Tint.R; numericUpDownTintGreen.Value = TextItemEditorControl.TextItem.Tint.G; numericUpDownTintBlue.Value = TextItemEditorControl.TextItem.Tint.B; textBoxColorHTML.Text = GetHTMLFromColor(TextItem.Tint); _ignoreNumericUpDownEvent = false; _ignoreNumericUpDownEvent = true; _ignoreNumericUpDownEvent = false; }