FRBDK/SpriteEditor/GameData.cs
/// <summary>
/// Sets the Stored values to the Sprite's actual values and adds the Sprite and its Texture2D to the ListWindow
/// </summary>
/// <param name="spriteToSetAndAdd"></param>
/// <param name="pixelSize"></param>
Sets the Stored values to the Sprite's actual values and adds the Sprite and its Texture2D to the ListWindow
Sets the Stored values to the Sprite ' s actual values and adds the Sprite and its Texture2D to the ListWindow
public static void SetStoredAddToSE(ISpriteEditorObject spriteToSetAndAdd, float pixelSize)
        {
            if (pixelSize > 0)
                spriteToSetAndAdd.PixelSize = pixelSize;
            if (spriteToSetAndAdd is Sprite)
            {
                if (((Sprite)spriteToSetAndAdd).Texture != null)
                    GuiData.ListWindow.Add(((Sprite)spriteToSetAndAdd).Texture);
                mScene.Sprites.Add((Sprite)spriteToSetAndAdd);
                UndoManager.AddToThisFramesUndo(new AddSpriteUndo(spriteToSetAndAdd as Sprite));
            }
            ListUnlistedAnimationChains();
        }
public static void SetStoredAddToSE ( ISpriteEditorObject spriteToSetAndAdd , float pixelSize ) { if ( pixelSize > 0 ) spriteToSetAndAdd . PixelSize = pixelSize ; if ( spriteToSetAndAdd is Sprite ) { if ( ( ( Sprite ) spriteToSetAndAdd ) . Texture != null ) GuiData . ListWindow . Add ( ( ( Sprite ) spriteToSetAndAdd ) . Texture ) ; mScene . Sprites . Add ( ( Sprite ) spriteToSetAndAdd ) ; UndoManager . AddToThisFramesUndo ( new AddSpriteUndo ( spriteToSetAndAdd as Sprite ) ) ; } ListUnlistedAnimationChains ( ) ; }
Sets the Stored values to the Sprite's actual values and adds the Sprite and its Texture2D to the ListWindow
Sets the Stored values to the Sprite ' s actual values and adds the Sprite and its Texture2D to the ListWindow
// if the Sprite references a null texture, we don't want to try to add that null texture to the texture box
spriteToSetAndAdd
ISpriteEditorObject
None
pixelSize
float
None