Example #1
0
 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);
 }
Example #2
0
 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;
 }