Skip to content

Commit

Permalink
imp - Allow foreground by default
Browse files Browse the repository at this point in the history
---

We need to allow foreground colors by default. This property is going to be deleted in the next minor release.

---

Type: imp
Breaking: False
Doc Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed May 29, 2024
1 parent b334ceb commit d631c7b
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion Terminaux/Colors/ColorTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ public static class ColorTools
internal static Random rng = new();
private static readonly ColorSettings globalSettings = new();
private static bool allowBackground;
private static bool allowForeground;
private static bool allowForeground = true;

/// <summary>
/// Global color settings
Expand Down
4 changes: 2 additions & 2 deletions Terminaux/Inputs/Styles/Selection/SelectionInputTools.cs
Original file line number Diff line number Diff line change
Expand Up @@ -212,8 +212,8 @@ altSelectedForegroundColor is not null || altSelectedBackgroundColor is not null
if (useColor)
{
buffer.Append(
finalForeColor.VTSequenceForeground +
finalBackColor.VTSequenceBackground +
ColorTools.RenderSetConsoleColor(finalForeColor) +
ColorTools.RenderSetConsoleColor(finalBackColor, true) +
TextWriterWhereColor.RenderWhere(AnswerOption + new string(' ', width - AnswerOption.Length), leftPos, optionTop, finalForeColor, finalBackColor) +
ColorTools.RenderSetConsoleColor(ColorTools.CurrentForegroundColor) +
ColorTools.RenderSetConsoleColor(ColorTools.CurrentBackgroundColor, true)
Expand Down
2 changes: 1 addition & 1 deletion Terminaux/Writer/ConsoleWriters/TextWriterWhereColor.cs
Original file line number Diff line number Diff line change
Expand Up @@ -371,7 +371,7 @@ internal static string RenderWhere(string msg, int Left, int Top, bool Return, i
Paragraphs = ConsoleMisc.GetWrappedSentencesByWords(msg, width);
var buffered = new StringBuilder();

// Se the colors and the positions as appropriate
// Set the colors and the positions as appropriate
if (useColors)
{
buffered.Append(
Expand Down

0 comments on commit d631c7b

Please sign in to comment.