public override void Draw(SpriteBatch SBatch, float?LayerDepth) { float Depth; if (LayerDepth != null) { Depth = (float)LayerDepth; } else { Depth = 0.10f; } m_LblTitle.Draw(SBatch, Depth + 0.1f); m_LblUsername.Draw(SBatch, Depth + 0.1f); m_LblPassword.Draw(SBatch, Depth + 0.1f); m_TxtUsername.Draw(SBatch, Depth + 0.1f); m_TxtPassword.Draw(SBatch, Depth + 0.1f); m_BtnLogin.Draw(SBatch, Depth + 0.1f); m_BtnExit.Draw(SBatch, Depth + 0.1f); base.Draw(SBatch, LayerDepth); }
public override void Draw(UISpriteBatch batch) { //base.Draw(batch); var res = EditorResource.Get(); if (Type == TREEBoxType.True || Type == TREEBoxType.False) { DrawLocalTexture(batch, (Type == TREEBoxType.True) ? res.TrueReturn : res.FalseReturn, new Vector2()); } else { if (InstPtr == 0) { DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(-3, -3), new Vector2(Width + 6, Height + 6), new Color(0x96, 0xFF, 0x73)); DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(-2, -2), new Vector2(Width + 4, Height + 4), new Color(0x46, 0x8C, 0x00)); //start point green } if (SliceBg != null) { if (Master.Selected.Contains(this)) { DrawSliceShadow(batch, Color.Red, new Vector2(1)); DrawSliceShadow(batch, Color.Red, new Vector2(-1)); DrawSliceShadow(batch, Color.Red, new Vector2(1, -1)); DrawSliceShadow(batch, Color.Red, new Vector2(-1, 1)); } SliceBg.Draw(batch); } else { if (Style.Background.A > 200) { DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(), new Vector2(Width, Height), Master.Selected.Contains(this) ? Color.Red : Color.White); //white outline } DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(1, 1), new Vector2(Width - 2, Height - 2), Style.Background); //background DrawTiledTexture(batch, res.DiagTile, new Rectangle(1, 1, Width - 2, Height - 2), Color.White * Style.DiagBrightness); DrawLocalTexture(batch, res.WhiteTex, null, new Vector2(1, 1), new Vector2(Width - 2, 20), Color.White * 0.66f); //title bg } Index?.Draw(batch); Title?.Draw(batch); TextEdit?.Draw(batch); if (BodyTextLabels != null) { TextRenderer.DrawText(BodyTextLabels.DrawingCommands, this, batch); } int topInd = 0; if (Instruction?.Breakpoint == true) { DrawLocalTexture(batch, res.Breakpoint, null, new Vector2(-20, 1 + ((topInd++) * 18)), new Vector2(1, 1), Color.White); } if (Master.DebugPointer == this) { DrawLocalTexture(batch, res.CurrentArrow, null, new Vector2(-20, 1 + ((topInd++) * 18)), new Vector2(1, 1), Color.White); } } if (CommentNode != null) { CommentNode.Draw(batch); } }