Browse Source

Add option to disable menu

master
lealeelu 8 years ago
parent
commit
8b06f173d2
  1. 1113
      Assets/Fungus/Resources/Prefabs/SaveMenu.prefab
  2. 16
      Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs
  3. 5808
      Assets/FungusExamples/Conversation/Say History.unity

1113
Assets/Fungus/Resources/Prefabs/SaveMenu.prefab

File diff suppressed because it is too large Load Diff

16
Assets/Fungus/Scripts/Components/NarrativeLogMenu.cs

@ -14,8 +14,11 @@ namespace Fungus
/// </summary> /// </summary>
public class NarrativeLogMenu : MonoBehaviour public class NarrativeLogMenu : MonoBehaviour
{ {
[Tooltip("The button that shows conversation history.")] [Tooltip("Show the Narrative Log Menu")]
[SerializeField] protected Button narrativeLogButton; [SerializeField] protected bool showLog = true;
[Tooltip("Show previous lines instead of previous and current")]
[SerializeField] protected bool previousLines = true;
[Tooltip("A scrollable text field used for displaying conversation history.")] [Tooltip("A scrollable text field used for displaying conversation history.")]
[SerializeField] protected ScrollRect narrativeLogView; [SerializeField] protected ScrollRect narrativeLogView;
@ -32,6 +35,8 @@ namespace Fungus
protected static NarrativeLogMenu instance; protected static NarrativeLogMenu instance;
protected virtual void Awake() protected virtual void Awake()
{
if (showLog)
{ {
// Only one instance of NarrativeLogMenu may exist // Only one instance of NarrativeLogMenu may exist
if (instance != null) if (instance != null)
@ -46,6 +51,13 @@ namespace Fungus
clickAudioSource = GetComponent<AudioSource>(); clickAudioSource = GetComponent<AudioSource>();
} }
else
{
GameObject logView = GameObject.Find("NarrativeLogView");
logView.SetActive(false);
this.enabled = false;
}
}
protected virtual void Start() protected virtual void Start()
{ {

5808
Assets/FungusExamples/Conversation/Say History.unity

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