I changed how they work. Prior to 0.6 the Content Pipeline had been used, but it was removed afterwards.
CustomUIStylesheetSample works, however it's code may be slightly confusing as it uses multiple Myra utility classes which arent documented.
Basically it has following organization:
1. All custom stylesheet assets are stored as resources.
2. The custom stylesheet setting/loading code is this:
MyraEnvironment.Game = this;
// Create resource asset resolver
var assetResolver = new ResourceAssetResolver(GetType().Assembly, "Myra.Samples.CustomUIStylesheetSample.Resources.");
// Load image containing font & ui spritesheet
var colorBuffer = ColorBuffer.FromStream(assetResolver.Open("ui_stylesheet_image.png"));
var texture = colorBuffer.CreateTexture2D();
// Load ui text atlas
var textureAtlas = TextureRegionAtlas.Load(assetResolver.ReadAsString("ui_stylesheet_atlas.atlas"),
s => texture);
// Load ui font(s)
var font = SpriteFontHelper.LoadFromFnt(assetResolver.ReadAsString("ui_font.fnt"),
// Load stylesheet
var stylesheet = Stylesheet.CreateFromSource(assetResolver.ReadAsString("ui_stylesheet.json"),
s => textureAtlas[s],
s => font);
Stylesheet.Current = stylesheet;
I've already documented what is ColorBuffer and SpriteFontHelper.
However rest of used utilities(TextureRegionAtlas and AssetResolver) arent documented yet.
But documentation for how-to load custom stylesheet has almost top priority in my list.