Beispiel #1
0
        public static Tile CreateOrUpdateSecondary(SecondaryTileData data, Rect area)
        {
            string[] sargs           = Tile.MakeSecondaryTileSargs(data);
            bool[]   bargs           = Tile.MakeSecondaryTileBargs(data);
            Color32  backgroundColor = data.backgroundColor;
            string   text            = Tile.CreateOrUpdateSecondaryTileArea(sargs, bargs, ref backgroundColor, (int)data.foregroundText, area);

            if (string.IsNullOrEmpty(text))
            {
                return(null);
            }
            return(new Tile(text));
        }
Beispiel #2
0
        /// <summary>
        ///   <para>Creates new or updates existing secondary tile.</para>
        /// </summary>
        /// <param name="data">The data used to create or update secondary tile.</param>
        /// <param name="pos">The coordinates for a request to create new tile.</param>
        /// <param name="area">The area on the screen above which the request to create new tile will be displayed.</param>
        /// <returns>
        ///   <para>New Tile object, that can be used for further work with the tile.</para>
        /// </returns>
        public static Tile CreateOrUpdateSecondary(SecondaryTileData data, Vector2 pos)
        {
            string[] sargs              = Tile.MakeSecondaryTileSargs(data);
            bool[]   bargs              = Tile.MakeSecondaryTileBargs(data);
            Color32  backgroundColor    = data.backgroundColor;
            string   secondaryTilePoint = Tile.CreateOrUpdateSecondaryTilePoint(sargs, bargs, ref backgroundColor, (int)data.foregroundText, pos);

            if (string.IsNullOrEmpty(secondaryTilePoint))
            {
                return((Tile)null);
            }
            return(new Tile(secondaryTilePoint));
        }
Beispiel #3
0
        public static Tile CreateOrUpdateSecondary(SecondaryTileData data, Vector2 pos)
        {
            string[] sargs           = Tile.MakeSecondaryTileSargs(data);
            bool[]   bargs           = Tile.MakeSecondaryTileBargs(data);
            Color32  backgroundColor = data.backgroundColor;
            string   text            = Tile.CreateOrUpdateSecondaryTilePoint(sargs, bargs, ref backgroundColor, (int)data.foregroundText, pos);
            Tile     result;

            if (string.IsNullOrEmpty(text))
            {
                result = null;
            }
            else
            {
                result = new Tile(text);
            }
            return(result);
        }