Two minor tweaks

This commit is contained in:
JFronny 2020-06-12 11:24:03 +02:00
parent 5f3fb98999
commit 79531147b2
2 changed files with 3 additions and 2 deletions

View File

@ -80,7 +80,7 @@ namespace CC_Functions.Commandline.TUI
/// Generates an integer for comparing this object
/// </summary>
/// <returns>The generated hash</returns>
public override int GetHashCode() => HashCode.Combine((int) BackColor, (int) ForeColor, Content);
public override int GetHashCode() => HashCode.Combine(BackColor, ForeColor, Content);
/// <summary>
/// Whether two pixels are equal

View File

@ -98,7 +98,7 @@ namespace CC_Functions.Commandline.TUI
switch (input.Key)
{
case ConsoleKey.Tab:
Tab(selectable, (input.Modifiers & ConsoleModifiers.Shift) != 0);
Tab(selectable, (input.Modifiers & ConsoleModifiers.Shift) == 0);
break;
case ConsoleKey.Enter:
if (selectable.Any() && selectable.Length >= TabPoint && selectable[TabPoint].Enabled)
@ -113,6 +113,7 @@ namespace CC_Functions.Commandline.TUI
default:
if (selectable.Any() && selectable.Length >= TabPoint && selectable[TabPoint].Enabled)
{
InvokeInput(this, input);
selectable[TabPoint].InvokeInput(this, input);
render = true;
}