private void load(TextureStore textures, GameHost host) { if (!textures.GetAvailableResources().Contains("Textures/SentakkiIcon.png")) { textures.AddStore(host.CreateTextureLoaderStore(ruleset.CreateResourceStore())); } Texture = textures.Get("Textures/SentakkiIcon.png"); }
private void load(TextureStore textures, FontStore store, GameHost host) { if (!textures.GetAvailableResources().Contains("Textures/tau.png")) { textures.AddStore(host.CreateTextureLoaderStore(ruleset.CreateResourceStore())); } // Note to new ruleset creators: // This is definitely something you should try to avoid. // Typically resources would only be loaded inside of gameplay, NOT anywhere else. // Until the osu! team figures out a safe way for you to use resources out of the gameplay area (e.g mods icon), // Please try to avoid this at all costs. store.AddStore(new GlyphStore( new ResourceStore <byte[]>(ruleset.CreateResourceStore()), "Fonts/tauFont", host.CreateTextureLoaderStore(ruleset.CreateResourceStore()))); AddRangeInternal(new Drawable[] { new SpriteIcon { Anchor = Anchor.Centre, Origin = Anchor.Centre, Icon = FontAwesome.Regular.Circle, }, new Sprite { RelativeSizeAxes = Axes.Both, Size = new Vector2(1), Scale = new Vector2(.625f), Anchor = Anchor.Centre, Origin = Anchor.Centre, Texture = textures.Get("Textures/tau") } }); }