diff --git a/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs b/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs index d1d9288d..e1571ef2 100644 --- a/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs +++ b/Assets/Fungus/UI/Scripts/Commands/FadeUI.cs @@ -5,13 +5,13 @@ using UnityEngine; using UnityEngine.UI; -using System.Collections; -using System.Collections.Generic; using Fungus; namespace Fungus { - + /// + /// Fades a UI object. + /// [CommandInfo("UI", "Fade UI", "Fades a UI object")] @@ -153,5 +153,4 @@ namespace Fungus return true; } } - } diff --git a/Assets/Fungus/UI/Scripts/Commands/GetText.cs b/Assets/Fungus/UI/Scripts/Commands/GetText.cs index 7e25e92d..7d7e19be 100644 --- a/Assets/Fungus/UI/Scripts/Commands/GetText.cs +++ b/Assets/Fungus/UI/Scripts/Commands/GetText.cs @@ -5,16 +5,16 @@ using UnityEngine; using UnityEngine.UI; -using System; -using System.Collections; using UnityEngine.Serialization; namespace Fungus { + /// + /// Gets the text property from a UI Text object and stores it in a string variable. + /// [CommandInfo("UI", "Get Text", "Gets the text property from a UI Text object and stores it in a string variable.")] - [AddComponentMenu("")] public class GetText : Command { @@ -94,5 +94,4 @@ namespace Fungus } } } - } \ No newline at end of file diff --git a/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs b/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs index c79bd07c..b04a2798 100644 --- a/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs +++ b/Assets/Fungus/UI/Scripts/Commands/SetInteractable.cs @@ -5,12 +5,13 @@ using UnityEngine; using UnityEngine.UI; -using System.Collections; using System.Collections.Generic; namespace Fungus { - + /// + /// Set the interactable sate of selectable objects. + /// [CommandInfo("UI", "Set Interactable", "Set the interactable sate of selectable objects.")] @@ -97,5 +98,4 @@ namespace Fungus return false; } } - } \ No newline at end of file diff --git a/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs b/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs index e91e9434..40ecb3a3 100644 --- a/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs +++ b/Assets/Fungus/UI/Scripts/Commands/SetSliderValue.cs @@ -5,11 +5,12 @@ using UnityEngine; using UnityEngine.UI; -using System.Collections; namespace Fungus { - + /// + /// Sets the value property of a slider object. + /// [CommandInfo("UI", "Set Slider Value", "Sets the value property of a slider object")] diff --git a/Assets/Fungus/UI/Scripts/Commands/SetText.cs b/Assets/Fungus/UI/Scripts/Commands/SetText.cs index 2c112272..4068ad46 100644 --- a/Assets/Fungus/UI/Scripts/Commands/SetText.cs +++ b/Assets/Fungus/UI/Scripts/Commands/SetText.cs @@ -5,16 +5,16 @@ using UnityEngine; using UnityEngine.UI; -using System; -using System.Collections; using UnityEngine.Serialization; namespace Fungus { + /// + /// Sets the text property on a UI Text object and/or an Input Field object. + /// [CommandInfo("UI", "Set Text", "Sets the text property on a UI Text object and/or an Input Field object.")] - [AddComponentMenu("")] public class SetText : Command, ILocalizable { diff --git a/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs b/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs index b982c84a..02aeb881 100644 --- a/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs +++ b/Assets/Fungus/UI/Scripts/Commands/TweenUI.cs @@ -4,14 +4,14 @@ */ using UnityEngine; -using UnityEngine.UI; -using System.Collections; using System.Collections.Generic; using Fungus; namespace Fungus { - + /// + /// Abstract base class for TweenUI commands. + /// public abstract class TweenUI : Command { [Tooltip("List of objects to be affected by the tween")] diff --git a/Assets/Fungus/UI/Scripts/Commands/Write.cs b/Assets/Fungus/UI/Scripts/Commands/Write.cs index dd4ebe14..8cbcaaf3 100644 --- a/Assets/Fungus/UI/Scripts/Commands/Write.cs +++ b/Assets/Fungus/UI/Scripts/Commands/Write.cs @@ -4,17 +4,15 @@ */ using UnityEngine; -using UnityEngine.UI; -using System; -using System.Collections; -using UnityEngine.Serialization; namespace Fungus { + /// + /// Writes content to a UI Text or Text Mesh object. + /// [CommandInfo("UI", "Write", "Writes content to a UI Text or Text Mesh object.")] - [AddComponentMenu("")] public class Write : Command, ILocalizable { diff --git a/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs b/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs index 8597582a..a4f7b421 100644 --- a/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs +++ b/Assets/Fungus/UI/Scripts/EventHandlers/ButtonClicked.cs @@ -5,10 +5,12 @@ using UnityEngine; using UnityEngine.UI; -using System.Collections; namespace Fungus { + /// + /// The block will execute when the user clicks on the target UI button object. + /// [EventHandlerInfo("UI", "Button Clicked", "The block will execute when the user clicks on the target UI button object.")] diff --git a/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs b/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs index 5fc7510b..be4fe72e 100644 --- a/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs +++ b/Assets/Fungus/UI/Scripts/EventHandlers/EndEdit.cs @@ -5,10 +5,12 @@ using UnityEngine; using UnityEngine.UI; -using System.Collections; namespace Fungus { + /// + /// The block will execute when the user finishes editing the text in the input field. + /// [EventHandlerInfo("UI", "End Edit", "The block will execute when the user finishes editing the text in the input field.")] diff --git a/Assets/Fungus/UI/Scripts/SelectOnEnable.cs b/Assets/Fungus/UI/Scripts/SelectOnEnable.cs index d13c8f26..8b61c4a1 100644 --- a/Assets/Fungus/UI/Scripts/SelectOnEnable.cs +++ b/Assets/Fungus/UI/Scripts/SelectOnEnable.cs @@ -3,17 +3,20 @@ using UnityEngine.UI; namespace Fungus { + /// + /// Select the UI element when the gameobject is enabled. + /// [RequireComponent(typeof(Selectable))] public class SelectOnEnable : MonoBehaviour { - private Selectable selectable; + protected Selectable selectable; - private void Awake() + protected void Awake() { selectable = GetComponent(); } - private void OnEnable() + protected void OnEnable() { selectable.Select(); } diff --git a/Assets/Fungus/UI/Scripts/TextTagParser.cs b/Assets/Fungus/UI/Scripts/TextTagParser.cs index 0dca8a40..b914c1ce 100644 --- a/Assets/Fungus/UI/Scripts/TextTagParser.cs +++ b/Assets/Fungus/UI/Scripts/TextTagParser.cs @@ -9,7 +9,9 @@ using System.Text.RegularExpressions; namespace Fungus { - + /// + /// Parses a string for special Fungus text tags. + /// public class TextTagParser { public enum TokenType diff --git a/Assets/Fungus/UI/Scripts/Writer.cs b/Assets/Fungus/UI/Scripts/Writer.cs index 6ca1e0ad..8d912e71 100644 --- a/Assets/Fungus/UI/Scripts/Writer.cs +++ b/Assets/Fungus/UI/Scripts/Writer.cs @@ -13,10 +13,9 @@ using System.Text; namespace Fungus { - - /** - * Implement this interface to be notified about Writer events - */ + /// + /// Implement this interface to be notified about Writer events. + /// public interface IWriterListener { /// @@ -41,7 +40,10 @@ namespace Fungus /// Called every time the Writer writes a new character glyph. void OnGlyph(); } - + + /// + /// Writes text using a typewriter effect to a UI text object. + /// public class Writer : MonoBehaviour, IDialogInputListener { [Tooltip("Gameobject containing a Text, Inout Field or Text Mesh object to write to")] @@ -70,12 +72,10 @@ namespace Fungus // This property is true when the writer is waiting for user input to continue protected bool isWaitingForInput; - public bool IsWaitingForInput { get { return isWaitingForInput; } } // This property is true when the writer is writing text or waiting (i.e. still processing tokens) protected bool isWriting; - public bool IsWriting { get { return isWriting; } } protected float currentWritingSpeed; diff --git a/Assets/Fungus/UI/Scripts/WriterAudio.cs b/Assets/Fungus/UI/Scripts/WriterAudio.cs index fad29364..82621068 100644 --- a/Assets/Fungus/UI/Scripts/WriterAudio.cs +++ b/Assets/Fungus/UI/Scripts/WriterAudio.cs @@ -4,14 +4,13 @@ */ using UnityEngine; -using System.Collections; using System.Collections.Generic; namespace Fungus { - /* - * Manages audio effects for Dialogs - */ + /// + /// Manages audio effects for Dialogs. + /// public class WriterAudio : MonoBehaviour, IWriterListener { [Tooltip("Volume level of writing sound effects")] @@ -74,12 +73,12 @@ namespace Fungus targetAudioSource.volume = 0f; } - /** - * Plays a voiceover audio clip. - * Voiceover behaves differently than speaking sound effects because it - * should keep on playing after the text has finished writing. It also - * does not pause for wait tags, punctuation, etc. - */ + /// + /// Plays a voiceover audio clip. + /// Voiceover behaves differently than speaking sound effects because it + /// should keep on playing after the text has finished writing. It also + /// does not pause for wait tags, punctuation, etc. + /// public virtual void PlayVoiceover(AudioClip voiceOverClip) { if (targetAudioSource == null)