private void DrawGUI(DwarfTime gameTime, float dx) { RasterizerState rasterizerState = new RasterizerState() { ScissorTestEnable = true }; GUI.PreRender(gameTime, DwarfGame.SpriteBatch); DwarfGame.SpriteBatch.Begin(SpriteSortMode.Immediate, BlendState.AlphaBlend, SamplerState.PointClamp, DepthStencilState.None, rasterizerState); Drawer2D.FillRect(DwarfGame.SpriteBatch, Game.GraphicsDevice.Viewport.Bounds, new Color(0, 0, 0, 200)); GUI.Render(gameTime, DwarfGame.SpriteBatch, new Vector2(dx, 0)); Drawer.Render(DwarfGame.SpriteBatch, null, Game.GraphicsDevice.Viewport); GUI.PostRender(gameTime); DwarfGame.SpriteBatch.End(); }