mirror of
https://github.com/claunia/SabreTools.git
synced 2025-12-16 19:14:27 +00:00
[Build] Account for variable width
This commit is contained in:
@@ -21,9 +21,10 @@ namespace SabreTools.Helper
|
|||||||
public static void Start(string name)
|
public static void Start(string name)
|
||||||
{
|
{
|
||||||
// Dynamically create the header string
|
// Dynamically create the header string
|
||||||
string border = "+-----------------------------------------------------------------------------+";
|
int width = Console.WindowWidth - 3;
|
||||||
|
string border = "+" + new string('-', width) + "+";
|
||||||
string mid = name + " " + Constants.Version;
|
string mid = name + " " + Constants.Version;
|
||||||
mid = "|" + mid.PadLeft(((77 - mid.Length) / 2) + mid.Length).PadRight(77) + "|";
|
mid = "|" + mid.PadLeft(((width - mid.Length) / 2) + mid.Length).PadRight(width) + "|";
|
||||||
|
|
||||||
// If we're outputting to console, do fancy things
|
// If we're outputting to console, do fancy things
|
||||||
if (!Console.IsOutputRedirected)
|
if (!Console.IsOutputRedirected)
|
||||||
|
|||||||
Reference in New Issue
Block a user