Draws a {@link Subtexture} repeatedly to fill the area, instead of stretching it
Inheritance: SubtextureDrawable
コード例 #1
0
        /// <summary>
        /// Returns a registered tiled drawable. If no tiled drawable is found but a Sprite exists with the name, a tiled drawable is
        /// created from the Sprite and stored in the skin
        /// </summary>
        /// <returns>The tiled drawable.</returns>
        /// <param name="name">Name.</param>
        public TiledDrawable GetTiledDrawable(string name)
        {
            var tiledDrawable = Get <TiledDrawable>(name);

            if (tiledDrawable != null)
            {
                return(tiledDrawable);
            }

            var sprite = Get <Sprite>(name);

            if (sprite != null)
            {
                tiledDrawable = new TiledDrawable(sprite);
                Add(name, tiledDrawable);
            }

            return(tiledDrawable);
        }
コード例 #2
0
        /// <summary>
        /// Returns a registered tiled drawable. If no tiled drawable is found but a Subtexture exists with the name, a tiled drawable is
        /// created from the Subtexture and stored in the skin
        /// </summary>
        /// <returns>The tiled drawable.</returns>
        /// <param name="name">Name.</param>
        public TiledDrawable getTiledDrawable(string name)
        {
            var tiledDrawable = get <TiledDrawable>(name);

            if (tiledDrawable != null)
            {
                return(tiledDrawable);
            }

            var subtexture = get <Subtexture>(name);

            if (subtexture != null)
            {
                tiledDrawable = new TiledDrawable(subtexture);
                add <TiledDrawable>(name, tiledDrawable);
            }

            return(tiledDrawable);
        }