FSO.Client.UI.Framework.UIExternalContainer.WidthHeightChange C# (CSharp) Method

WidthHeightChange() public method

public WidthHeightChange ( int width, int height ) : void
width int
height int
return void
        public void WidthHeightChange(int width, int height)
        {
            //this should be called on the UI thread, otherwise monogame will lose it.
            if (Batch != null) Batch.Dispose();
            Batch = new UISpriteBatch(GameFacade.GraphicsDevice, 1, width, height, GlobalSettings.Default.AntiAlias?4:0);
            RawImage = new byte[width * height * 4];
            BatchDirty = false;

            State.UIState.Width = width;
            State.UIState.Height = height;
            DoRedraw = true;
        }