Update Lua registered functions window after restart
Make registered functions window show functions for new LuaImp after core restart/reopening the Lua console
This commit is contained in:
parent
ee66faba0b
commit
6aa7c48402
|
@ -736,11 +736,13 @@ namespace BizHawk.Client.EmuHawk
|
|||
return true;
|
||||
}
|
||||
|
||||
private static void UpdateRegisteredFunctionsDialog()
|
||||
private void UpdateRegisteredFunctionsDialog()
|
||||
{
|
||||
if (LuaImp is null) return;
|
||||
|
||||
foreach (var form in Application.OpenForms.OfType<LuaRegisteredFunctionsList>().ToList())
|
||||
{
|
||||
form.UpdateValues();
|
||||
form.UpdateValues(LuaImp.RegisteredFunctions);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -10,7 +10,7 @@ namespace BizHawk.Client.EmuHawk
|
|||
{
|
||||
private readonly IMainFormForApi _mainForm;
|
||||
|
||||
private readonly LuaFunctionList _registeredFunctions;
|
||||
private LuaFunctionList _registeredFunctions;
|
||||
|
||||
public LuaRegisteredFunctionsList(IMainFormForApi mainForm, LuaFunctionList registeredFunctions)
|
||||
{
|
||||
|
@ -22,8 +22,9 @@ namespace BizHawk.Client.EmuHawk
|
|||
|
||||
public Point StartLocation { get; set; } = new Point(0, 0);
|
||||
|
||||
public void UpdateValues()
|
||||
public void UpdateValues(LuaFunctionList registeredFunctions)
|
||||
{
|
||||
_registeredFunctions = registeredFunctions;
|
||||
PopulateListView();
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue