You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This might not be your problem at all. I'm almost sure that is actually mine, but if that's the case, it would be nice to include some documentation on how to fix this. When formatting a string to pad right println!("{:>33}", "name".red()) extra padding must be applied to account for the control characters in the stream. Is there a way to tell the println!, format! and write! family of macros to not take into account control characters when calculating string length for output?
I ask because I'm building an interface that may apply multiple colors (one background, one foreground) to an output line and I'd love the text that it's outputting aligned correctly. The application that I'm making will make heavy use of colors to convey messages and meaning to the viewer. It take information from the Formula 1 '22 game over a UDP socket displays a timing and scoring screen like that found on the pitwall. As such, I've called it Pitwall. Displaying information like flag status for that driver (In a yellow flag, getting a blue flag) would be displayed by changing the background color of their name on the output making it exceedingly obvious when something has happened. I will also make use of it extensively for the timing component where when a fastest sector time or lap time is set that time will "go purple."
The text was updated successfully, but these errors were encountered:
This might not be your problem at all. I'm almost sure that is actually mine, but if that's the case, it would be nice to include some documentation on how to fix this. When formatting a string to pad right
println!("{:>33}", "name".red())
extra padding must be applied to account for the control characters in the stream. Is there a way to tell theprintln!
,format!
andwrite!
family of macros to not take into account control characters when calculating string length for output?I ask because I'm building an interface that may apply multiple colors (one background, one foreground) to an output line and I'd love the text that it's outputting aligned correctly. The application that I'm making will make heavy use of colors to convey messages and meaning to the viewer. It take information from the Formula 1 '22 game over a UDP socket displays a timing and scoring screen like that found on the pitwall. As such, I've called it Pitwall. Displaying information like flag status for that driver (In a yellow flag, getting a blue flag) would be displayed by changing the background color of their name on the output making it exceedingly obvious when something has happened. I will also make use of it extensively for the timing component where when a fastest sector time or lap time is set that time will "go purple."
The text was updated successfully, but these errors were encountered: