mirror of
https://git.alee14.me/shiftos-archive/ShiftOS_TheReturn.git
synced 2025-02-02 06:17:34 +00:00
Fix console forwarding with infoboxes
This commit is contained in:
parent
481623e074
commit
aa9234c681
2 changed files with 5 additions and 1 deletions
|
@ -67,9 +67,11 @@ namespace ShiftOS.Engine
|
|||
public static bool ShowYesNo(Dictionary<string, object> args)
|
||||
{
|
||||
bool forwarding = TerminalBackend.IsForwardingConsoleWrites;
|
||||
var fGuid = TerminalBackend.ForwardGUID;
|
||||
Action<bool> callback = (result) =>
|
||||
{
|
||||
TerminalBackend.IsForwardingConsoleWrites = forwarding;
|
||||
TerminalBackend.ForwardGUID = (forwarding == true) ? fGuid : null;
|
||||
string resultFriendly = (result == true) ? "yes" : "no";
|
||||
Console.WriteLine($"{SaveSystem.CurrentSave.Username} says {resultFriendly}.");
|
||||
TerminalBackend.IsForwardingConsoleWrites = false;
|
||||
|
@ -88,9 +90,11 @@ namespace ShiftOS.Engine
|
|||
public static bool ShowText(Dictionary<string, object> args)
|
||||
{
|
||||
bool forwarding = TerminalBackend.IsForwardingConsoleWrites;
|
||||
var fGuid = TerminalBackend.ForwardGUID;
|
||||
Action<string> callback = (result) =>
|
||||
{
|
||||
TerminalBackend.IsForwardingConsoleWrites = forwarding;
|
||||
TerminalBackend.ForwardGUID = (forwarding == true) ? fGuid : null;
|
||||
Console.WriteLine($"{SaveSystem.CurrentSave.Username} says \"{result}\".");
|
||||
TerminalBackend.IsForwardingConsoleWrites = false;
|
||||
};
|
||||
|
|
|
@ -317,7 +317,7 @@ namespace ShiftOS.Engine
|
|||
}
|
||||
|
||||
public static bool IsForwardingConsoleWrites { get; internal set; }
|
||||
public static string ForwardGUID { get; private set; }
|
||||
public static string ForwardGUID { get; internal set; }
|
||||
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue