Skip to content

Commit

Permalink
缺失代码
Browse files Browse the repository at this point in the history
  • Loading branch information
Coloryr committed Jan 28, 2024
1 parent 90ecedd commit f29f02d
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/ColorMC.Gui/UI/Model/Setting/SettingTab8Model.cs
Original file line number Diff line number Diff line change
Expand Up @@ -767,6 +767,7 @@ public bool InputKey(KeyModifiers modifiers, Key key)

private Task<InputKeyObj?> WaitKey(CancellationToken token)
{
InputControlUtils.IsEditMode = true;
InputKeyObj? keys = null;
bool output = false;
inputKey = (key) =>
Expand All @@ -784,6 +785,8 @@ public bool InputKey(KeyModifiers modifiers, Key key)
return null;
}
System.Threading.Thread.Sleep(100);

InputControlUtils.IsEditMode = false;
}

return keys;
Expand Down
1 change: 1 addition & 0 deletions src/ColorMC.Gui/Utils/InputControlUtils.cs
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ public static class InputControlUtils

public static bool IsInit { get; private set; }
public static event Action<Event>? OnEvent;
public static bool IsEditMode = false;

public static void Init()
{
Expand Down

0 comments on commit f29f02d

Please sign in to comment.