alexguirre / RAGENativeUI

MIT License
115 stars 38 forks source link

Added custom texture banners #3

Closed Guad closed 8 years ago

Guad commented 8 years ago

Seems to work as intended, except when you are using Windowed and have it set to the maximum resolution, where the banner slides a bit to the left. Also a little bit of flickering, but there's nothing I can do about it I think.

Usage:

var myMenu = new UIMenu("", "TEST");
myMenu.SetBannerType(Game.CreateTextureFromFile("banner.png"));
menuPool.Add(myMenu);

public static void FrameRender(object sender, GraphicsEventArgs e)
{
    menuPool.ProcessMenus();
    menuPool.DrawBanners(e);
}
alexguirre commented 8 years ago

Looks good to me, it will be in v1.2

alexguirre commented 8 years ago

In RPH 0.29 the event Game.RawFrameRender was added, if you use this instead of Game.FrameRender there isn't any flickering, but you can't use any game native: So you should have the normal FrameRender to ProcessMenus() and the RawFrameRender to DrawBanners()