Browse Source

Fixed setmenudialog() lua function does not set main active menu dialog #578

master
Christopher 8 years ago
parent
commit
c8a257fb1e
  1. 1
      Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt
  2. 8
      Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs
  3. 3494
      Assets/Tests/Narrative/MenuTests.unity

1
Assets/Fungus/Thirdparty/FungusLua/Resources/Lua/fungus.txt vendored

@ -220,6 +220,7 @@ M.menuoptions = {}
-- Set the active menudialog to use with the menu function
function M.setmenudialog(menudialog)
M.menuoptions.menudialog = menudialog
luautils.SetMenuDialog(menudialog)
end
-- Gets the active menu dialog, or creates one if none exists yet

8
Assets/Fungus/Thirdparty/FungusLua/Scripts/Components/LuaUtils.cs vendored

@ -461,6 +461,14 @@ namespace Fungus
SayDialog.ActiveSayDialog = sayDialog;
}
/// <summary>
/// Sync the active menu dialog with what Lua thinks the MenuDialog should be
/// </summary>
public void SetMenuDialog(MenuDialog menuDialog)
{
MenuDialog.ActiveMenuDialog = menuDialog;
}
#endregion
#region LuaEnvironmentInitializer implementation

3494
Assets/Tests/Narrative/MenuTests.unity

File diff suppressed because it is too large Load Diff
Loading…
Cancel
Save