MovieSession - add a PopupMessage method, will be used later

This commit is contained in:
adelikat 2020-02-08 10:50:05 -06:00
parent 4fed717858
commit f43d7c5b1b
2 changed files with 7 additions and 0 deletions

View File

@ -32,6 +32,7 @@ namespace BizHawk.Client.Common
public IMovie Movie { get; set; }
public bool ReadOnly { get; set; } = true;
public Action<string> MessageCallback { get; set; }
public Action<string> PopupCallback { get; set; }
public Func<string, string, bool> AskYesNoCallback { get; set; }
/// <summary>
@ -88,6 +89,11 @@ namespace BizHawk.Client.Common
}
}
private void PopupMessage(string message)
{
PopupCallback?.Invoke(message);
}
private void Output(string message)
{
MessageCallback?.Invoke(message);

View File

@ -214,6 +214,7 @@ namespace BizHawk.Client.EmuHawk
Movie = MovieService.DefaultInstance,
MovieControllerAdapter = MovieService.DefaultInstance.LogGeneratorInstance().MovieControllerAdapter,
MessageCallback = AddOnScreenMessage,
PopupCallback = ShowMessageCoreComm,
AskYesNoCallback = StateErrorAskUser,
PauseCallback = PauseEmulator,
ModeChangedCallback = SetMainformMovieInfo