Custom Banners - Guad/NativeUI GitHub Wiki

With NativeUI you can easily customize your menu. You can set a custom banner with the SetBannerType method.

UIResRectangle as Banner

First you create a rectangle with your desired colors and then you call the SetBannerType method.

var banner = new UIResRectangle();
banner.Color = Color.FromArgb(255, 255, 255, 255);
myMenu.SetBannerType(banner);

No need to worry about position or size, NativeUI will take care of everything.

Game sprite as Banner

Setting a sprite as the banner is as easy as the rectangle.

var banner = new Sprite("shopui_title_barber", "shopui_title_barber", new Point(0,0), new Size(0,0));
myMenu.SetBannerType(banner);

Custom Texture as Banner

You can deliver your texture in a zip file with your mod or you can embed it in your dll.

myMenu.SetBannerType("scripts\\banner.png"); // Extracted from zip

myMenu.SetBannerType(Sprite.WriteFromResource(Assembly.GetExecutingAssembly(), "SolutionName.file.png");
// From resource

No Banner

You can also remove the banner completely and only leave the subtitle. You will have to create a blank UIResRectangle and offset the menu by -107 pixels high.

var myMenu = new UIMenu("", "Banner-less menu", new Point(0, -107);
var rectangle = new UIResRectangle();
rectangle.Color = Color.FromArgb(0,0,0,0);
myMenu.SetCustomBanner(rectangle);