public ShadDraw ( FSO.Client.UI.Framework.UISpriteBatch batch ) : void | ||
batch | FSO.Client.UI.Framework.UISpriteBatch | |
return | void |
public override void Draw(UISpriteBatch batch) { var width = batch.GraphicsDevice.Viewport.Width; var height = batch.GraphicsDevice.Viewport.Height; BHAVView.Width = width; BHAVView.Height = height; base.Draw(batch); if (Placement != null) { Placement.PreDraw(batch); Placement.ShadDraw(batch); Placement.Draw(batch); } var res = EditorResource.Get(); DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(), new Vector2(4, height), Color.Black * 0.2f); DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(4, 0), new Vector2(width, 4), Color.Black * 0.2f); if (DebugMode) { if (width != LastWidth) { DebugTrue.Position = new Vector2(width - 80, 5); DebugFalse.Position = new Vector2(width - 55, 5); DebugReset.Position = new Vector2(width - 30, 5); GameThread.NextUpdate(x => Invalidate()); } } if (Placement != null) { DrawCutoutLines(CutoutPhase, 5, Color.Black * 0.2f, batch); DrawCutoutLines(CutoutPhase, 0, new Color(0, 102, 26), batch); } LastWidth = width; LastHeight = height; }
public override void Draw(UISpriteBatch batch) { base.Draw(batch); if (Placement != null) { Placement.ShadDraw(batch); Placement.Draw(batch); } var res = EditorResource.Get(); DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(), new Vector2(4, batch.Height), Color.Black * 0.2f); DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(4, 0), new Vector2(batch.Width, 4), Color.Black * 0.2f); if (Placement != null) { DrawCutoutLines(CutoutPhase, 5, Color.Black * 0.2f, batch); DrawCutoutLines(CutoutPhase, 0, new Color(0, 102, 26), batch); } LastWidth = batch.Width; LastHeight = batch.Height; }