public SelectionBox(TextCaret caret, Label parent) : base(parent) { text = parent.TextBoard; this.caret = caret; Start = -Vector2I.One; highlightBoard = new MatBoard(); highlightList = new List <HighlightBox>(); }
public HighlightBox(HudParentBase parent = null) : base(parent) { tabBoard = new MatBoard() { Color = TerminalFormatting.Mercury }; Color = TerminalFormatting.Atomic; CanDrawTab = true; IsSelectivelyMasked = true; }
public BlockBoard() { faces = new MatBoard[6]; octant = new Vector3D[8]; for (int n = 0; n < 6; n++) { faces[n] = new MatBoard(); } }
public void Draw(MatBoard matBoard, Vector2 origin, Vector2 tbOffset, Vector2 xBounds, ref MatrixD matrix) { CroppedBox box = default(CroppedBox); Vector2 clipSize, clipPos; clipSize = size; clipPos = offset + tbOffset; // Determine the visible extents of the highlight box within the bounds of the textboard float leftBound = Math.Max(clipPos.X - clipSize.X * .5f, xBounds.X), rightBound = Math.Min(clipPos.X + clipSize.X * .5f, xBounds.Y); // Adjust highlight size and offset to compensate for textboard clipping and offset clipSize.X = Math.Max(0, rightBound - leftBound); clipPos.X = (rightBound + leftBound) * .5f; clipPos += origin; clipSize *= .5f; box.bounds = new BoundingBox2(clipPos - clipSize, clipPos + clipSize); matBoard.Draw(ref box, ref matrix); }
public TexturedBox(HudParentBase parent) : base(parent) { hudBoard = new MatBoard(); Size = new Vector2(50f); }
public BorderBox(HudParentBase parent) : base(parent) { hudBoard = new MatBoard(); Thickness = 1f; }