JavaScript required
We’re sorry, but Coda doesn’t work properly without JavaScript enabled.
Skip to content
Gallery
Bannerlord Wiki
Bannerlord Wiki
Type
Global Tables
Campaign
More
Share
Explore
Tutorials
Loading Spite Data
Loading Sprite Data
Module/GUI/ModuleSpriteData.xml
Instantiate Game Objects in Class
UIResourceManager.UIResourceDepot
UIResourceManager.ResourceContext
UIResrouceManager.SpriteData
Capture Sprite Data
SpriteData spirteData = new SpriteData("XmlSpriteData");
spriteData.load(UIResourceManager.UIResourceDepot);
Loading Textures
Filepath
Code
Texture texture = new Texture(new EngineTexture(Texture.CreateTextureFromPath("../../Modules/Entrepreneur/GUI/SpriteSheets/", "entrepreneur-ui-1.png")));
Loading Sprite Category
XML
Code
SpriteData sd = UIResourceManager.SpriteData;
SpriteData spriteData = new SpriteData("EntrepreneurSpriteData");
sd.SpriteCategories.Add("entrepreneur_icons", spriteData.SpriteCategories["entrepreneur_icons"]);
Loading SpritePartName
XML
Code
SpriteData sd = UIResourceManager.SpriteData;
SpriteData spriteData = new SpriteData("EntrepreneurSpriteData");
sd.SpritePartNames.Add("FinancesIcon", spriteData.SpritePartNames["FinancesIcon"]);
Loading SpirteNames
???
Code
sd.SpriteNames.Add("Entrepreneur.EmptyField", new SpriteGeneric("Entrepreneur.EmptyField", spriteData.SpritePartNames["Entrepreneur.EmptyField"]));
SpriteCategory bettertimeicons = sd.SpriteCategories["entrepreneur_icons"];
bettertimeicons.SpriteSheets.Add(texture);
bettertimeicons.Load(rc, rd);
UIResourceManager.BrushFactory.Initialize();
Want to print your doc?
This is not the way.
Try clicking the ⋯ next to your doc name or using a keyboard shortcut (
Ctrl
P
) instead.