Exemplo n.º 1
0
        public static Stylesheet CreateFromSource(string s,
                                                  Func <string, TextureRegion2D> textureGetter,
                                                  Func <string, BitmapFont> fontGetter)
        {
            var root = JObject.Parse(s);

            var loader = new StylesheetLoader(root, textureGetter, fontGetter);

            return(loader.Load());
        }
Exemplo n.º 2
0
        public static Stylesheet CreateFromSource(string s,
                                                  Func <string, TextureRegion> textureGetter,
                                                  Func <string, SpriteFont> fontGetter)
        {
            var root = (Dictionary <string, object>)Json.Deserialize(s);

            var loader = new StylesheetLoader(root, textureGetter, fontGetter);

            return(loader.Load());
        }