Example #1
0
 protected virtual void OnLayerChanged(LayerChangedEventArgs e)
 {
     if (LayerChanged != null)
     {
         LayerChanged(this, e);
     }
 }
Example #2
0
 void imageListBox_SelectedIndexChanged(object sender, EventArgs e)
 {
     if (onLayerChanged != null)
     {
         LayerChangedEventArgs ea = new LayerChangedEventArgs(this.imageListBox.SelectedIndex);
         onLayerChanged.Invoke(this, ea);
     }
 }
 void layers_LayerSelectabilityChanged(object sender, LayerChangedEventArgs e)
 {
     foreach (var checkBox in LayersStack.Children.Cast <UIElement>()
              .OfType <CheckBox>()
              .Where(checkBox => Grid.GetColumn(checkBox) == 3 && checkBox.Tag.ToString() == e.LayerName))
     {
         checkBox.IsChecked = layers.IsSelectable(layers[e.LayerName]);
     }
 }
Example #4
0
 private void LayerChangedHandler(object sender, LayerChangedEventArgs e)
 {
     if (_undoRedoEnabled && !_restoringState && _trackingEnabled &&
         (e.ChangeType == LayerChangeType.ObjectAdded ||
          e.ChangeType == LayerChangeType.ObjectRemoved ||
          e.ChangeType == LayerChangeType.ObjectZOrderChanged ||
          e.ChangeType == LayerChangeType.VisibilityChanged ||
          e.ChangeType == LayerChangeType.LockStatusChanged))
     {
         SaveState();
     }
 }
    /// <summary>
    /// Called when raycasting detects a change in the layer hit.
    /// </summary>
    /// <param name="sender">The object that broadcasted the event.</param>
    /// <param name="e">Additional information about the event.</param>
    private void OnLayerChanged(object sender, LayerChangedEventArgs e)
    {
        switch (e.CurrentLayer)
        {
        case Layer.Walkable:
            Cursor.SetCursor(_standardCursor, _standardCursorTopLeftOffset, CursorMode.Auto);
            break;

        case Layer.Enemy:
            Assert.IsNotNull(_attackCursor);
            Cursor.SetCursor(_attackCursor, _attackCursorTopLeftOffset, CursorMode.Auto);
            break;

        default:
            Assert.IsNotNull(_unresolvedCursor);
            Cursor.SetCursor(_unresolvedCursor, _standardCursorTopLeftOffset, CursorMode.Auto);
            break;
        }
    }
 /// <summary>
 /// Handles the LayerChanged event of the <see cref="EditorTileMap"/> class.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="LayerChangedEventArgs"/> instance containing the event data.</param>
 private void LayerChanged(object sender, LayerChangedEventArgs e)
 {
     BuildList();
 }
 private void Layers_LayerVisibilityChanged(object sender, LayerChangedEventArgs e)
 {
     UpdateCopyrightText();
 }
 private void Layers_LayerRemoved(object sender, LayerChangedEventArgs e)
 {
     UpdateCopyrightText();
     e.Layer.PropertyChanged -= Layer_PropertyChanged;
 }
Example #9
0
        void OnSpriteLayerChanged(object sender, LayerChangedEventArgs e) {
            _sprites.Sort();

            CreateBufferObjects();
        }
Example #10
0
 void layersForm_onLayerRemoved(object sender, LayerChangedEventArgs e)
 {
     if (this.ActiveMdiChild != null)
     {
         MapForm m = (MapForm)this.ActiveMdiChild;
         m.RemoveLayer(e.LayerIndex);
     }
 }
Example #11
0
 private void LayerChangedHandler(object sender, LayerChangedEventArgs e)
 {
     OnLayerChanged(e);
 }
Example #12
0
 private void Node_LayerDataChanged(object sender, LayerChangedEventArgs e)
 {
     OnLayerDataChanged(e);
 }
Example #13
0
 public void OnLayerChanged(object sender, LayerChangedEventArgs e)
 {
     Print($"Layer changed to {e.Layer}");
 }
Example #14
0
 /// <summary>
 /// Handles the LayerChanged event of the <see cref="Map"/> class.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="LayerChangedEventArgs"/> instance containing the event data.</param>
 private void LayerChanged(object sender, LayerChangedEventArgs e)
 {
     Render();
 }