Browse Source

Merge pull request #282 from FungusGames/menu-substitute-variables

Fixed Variable substitution in Menu command #263
master
Chris Gregan 9 years ago
parent
commit
202442efaf
  1. 5
      Assets/Fungus/Narrative/Scripts/Commands/Menu.cs
  2. 2
      Assets/Fungus/Narrative/Scripts/DialogInput.cs
  3. 2091
      Assets/Tests/Narrative/NarrativeTests.unity

5
Assets/Fungus/Narrative/Scripts/Commands/Menu.cs

@ -47,7 +47,10 @@ namespace Fungus
if (menuDialog != null)
{
menuDialog.gameObject.SetActive(true);
string displayText = text;
Flowchart flowchart = GetFlowchart();
string displayText = flowchart.SubstituteVariables(text);
menuDialog.AddOption(displayText, interactable, targetBlock);
}
}

2
Assets/Fungus/Narrative/Scripts/DialogInput.cs

@ -144,7 +144,7 @@ namespace Fungus
// Ignore input events if a Menu is being displayed
if (MenuDialog.activeMenuDialog != null)
{
if (MenuDialog.activeMenuDialog.gameObject.activeSelf)
if (MenuDialog.activeMenuDialog.gameObject.activeInHierarchy)
{
dialogClickedFlag = false;
nextLineInputFlag = false;

2091
Assets/Tests/Narrative/NarrativeTests.unity

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