public LabelNode(BasicTextNodeStructure structure, TextRenderElementStyle text_style, RectangleRenderElementStyle border_style) : base(structure, border_style) { Structure = structure; TextStyle = text_style; TextElement = new TextRenderElement(Position, Text, text_style.Color, text_style.FontSize, text_style.FontStyle); }
public TextBoxNode(BasicTextNodeStructure structure, TextRenderElementStyle text_style, RectangleRenderElementStyle border_style) : base(structure, text_style, border_style) { TriggerAreas.Add(new RectangleHitbox(Position, Width, Height)); OnKeyPress += HandleKey; OnFocused += (sender, args) => FillColor = Color.CadetBlue; OnUnfocused += (sender, args) => FillColor = Color.White; }