Added pause option to config

It now pauses in hud messages
master
Mohammad Shoaib 2022-05-12 16:00:20 +05:30
parent 92d5ae22d9
commit ebc68f0ffa
3 changed files with 6 additions and 0 deletions

View File

@ -63,6 +63,8 @@ namespace stardew_access.Features
MainClass.hudMessageQueryKey = searchQuery; MainClass.hudMessageQueryKey = searchQuery;
MainClass.ScreenReader.Say(toSpeak, true); MainClass.ScreenReader.Say(toSpeak, true);
// Pause to avoid interruption
MainClass.ReadTileFeature.pause();
} }
} }
} }

View File

@ -39,6 +39,9 @@ namespace stardew_access.Features
/// <param name="time">The amount of time we want to pause the execution (in ms).<br/>Default is 2500 (2.5s).</param> /// <param name="time">The amount of time we want to pause the execution (in ms).<br/>Default is 2500 (2.5s).</param>
public void pause(int time = 2500) public void pause(int time = 2500)
{ {
if (!MainClass.Config.ReadTileAllowPausing)
return;
this.shouldPause = true; this.shouldPause = true;
Task.Delay(time).ContinueWith(_ => { this.shouldPause = false; }); Task.Delay(time).ContinueWith(_ => { this.shouldPause = false; });
} }

View File

@ -6,6 +6,7 @@ namespace stardew_access
{ {
public Boolean VerboseCoordinates { get; set; } = true; public Boolean VerboseCoordinates { get; set; } = true;
public Boolean ReadTile { get; set; } = true; public Boolean ReadTile { get; set; } = true;
public Boolean ReadTileAllowPausing { get; set; } = true;
public Boolean SnapMouse { get; set; } = true; public Boolean SnapMouse { get; set; } = true;
public Boolean Radar { get; set; } = false; public Boolean Radar { get; set; } = false;
public Boolean RadarStereoSound { get; set; } = true; public Boolean RadarStereoSound { get; set; } = true;