Menus Customization - alexguirre/RAGENativeUI GitHub Wiki

Table of Contents

  1. Banners
  2. Colors
  3. Text Styles

Banners

Banners can be changed with the UIMenu.SetBannerType and UIMenu.RemoveBanner methods.

Game Sprite

The overload UIMenu.SetBannerType(Sprite) allows to use images from texture dictionaries (.ytd) as the banner.

menu.SetBannerType(new Sprite("commonmenu", "interaction_bgd", Point.Empty, Size.Empty));

/images/menus/banners/sprite.png

Single Color

The overload UIMenu.SetBannerType(Color) allows to change the banner to single color rectangle.

menu.SetBannerType(Color.FromArgb(255, 200, 10, 10));

/images/menus/banners/color.png

Custom Texture

The overload UIMenu.SetBannerType(Rage.Texture) allows to change the banner to an external image, loaded using Game.CreateTextureFromFile(string). If this banner type is used, MenuPool.DrawBanners(Rage.Graphics) or UIMenu.DrawBanner(Rage.Graphics) must be called from the Game.RawFrameRender event.

menu.SetBannerType(Game.CreateTextureFromFile("custom-banner.png"));
Game.RawFrameRender += (s, e) => pool.DrawBanners(e.Graphics);

/images/menus/banners/custom.png

No Banner

UIMenu.RemoveBanner() allows to remove the banner completely.

menu.RemoveBanner();

/images/menus/banners/removed.png

Colors

TBD

Text Styles

TBD