diff --git a/Instructions/TextInstruction.cs b/Instructions/TextInstruction.cs index 0355008..a135d77 100644 --- a/Instructions/TextInstruction.cs +++ b/Instructions/TextInstruction.cs @@ -10,6 +10,8 @@ public class TextInstruction : BaseInstruction [JsonConverter(typeof(JsonStringEnumConverter))] public Alignment alignment {get; set; } = Alignment.Left; + public bool underline {get; set; } = false; + public bool newLine { get; set; } = true; public override List GetInstructions() { @@ -18,6 +20,10 @@ public class TextInstruction : BaseInstruction commands.Add(alignmentCommand(alignment)); + if (underline){ + commands.Add(e.SetStyles(PrintStyle.Underline)); + } + if (newLine) { commands.Add(e.PrintLine(text)); @@ -27,6 +33,10 @@ public class TextInstruction : BaseInstruction commands.Add(e.Print(text)); } + if (underline){ + commands.Add(e.SetStyles(PrintStyle.None)); + } + return commands; } } \ No newline at end of file