Skip to content

Commit

Permalink
chg - Fixed equalizer draw issues
Browse files Browse the repository at this point in the history
---

Type: chg
Breaking: False
Doc Required: False
Backport Required: False
Part: 1/1
  • Loading branch information
AptiviCEO committed Sep 18, 2024
1 parent 56917ea commit c4b3e7d
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions BassBoom.Cli/CliBase/Equalizer.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,10 @@
using Terminaux.Colors;
using Terminaux.Colors.Data;
using Terminaux.Inputs.Styles.Infobox;
using Terminaux.Writer.ConsoleWriters;
using Terminaux.Writer.FancyWriters;
using Terminaux.Reader;
using Terminaux.Inputs;
using System.Collections.Generic;
using Terminaux.Inputs.Styles.Selection;
using Terminaux.Base.Extensions;
using BassBoom.Basolia.Exceptions;
using Terminaux.Inputs.Styles;
using Terminaux.Writer.MiscWriters.Tools;
Expand All @@ -54,7 +51,6 @@ internal static class Equalizer
internal static void OpenEqualizer(Screen screen)
{
// First, initialize a screen part to handle drawing
Common.redraw = true;
ScreenPart screenPart = new();
screenPart.AddDynamicText(HandleDraw);
screen.RemoveBufferedParts();
Expand Down Expand Up @@ -125,20 +121,16 @@ private static void HandleKeypress(ConsoleKeyInfo keystroke)
break;
case ConsoleKey.Q:
exiting = true;
Common.redraw = true;
break;
}
}

private static string HandleDraw()
{
if (!Common.redraw)
return "";
Common.redraw = false;

// Prepare things
var drawn = new StringBuilder();
ConsoleWrapper.CursorVisible = false;
ColorTools.LoadBack();

// First, print the keystrokes
drawn.Append(KeybindingsWriter.RenderKeybindings(showBindings, 0, ConsoleWrapper.WindowHeight - 1));
Expand Down

0 comments on commit c4b3e7d

Please sign in to comment.