public static UIStateSprite create(UIToolkit manager, string[] filenames, int xPos, int yPos, int depth)
    {
        // Grab the texture details for the initial state
        UITextureInfo firstNormalTI = manager.textureInfoForFilename(filenames[0]);
        Rect frame = new Rect(xPos, yPos, firstNormalTI.frame.width, firstNormalTI.frame.height);

        // create the button
        UIStateSprite sprite = new UIStateSprite(manager, frame, depth, firstNormalTI.uvRect);
        // Add frames
        sprite.addFrames(filenames);

        return sprite;
    }
Пример #2
0
    public static UIStateSprite create(UIToolkit manager, string[] filenames, int xPos, int yPos, int depth)
    {
        // Grab the texture details for the initial state
        UITextureInfo firstNormalTI = manager.textureInfoForFilename(filenames[0]);
        Rect          frame         = new Rect(xPos, yPos, firstNormalTI.frame.width, firstNormalTI.frame.height);

        // create the button
        UIStateSprite sprite = new UIStateSprite(manager, frame, depth, firstNormalTI.uvRect);

        // Add frames
        sprite.addFrames(filenames);

        return(sprite);
    }