You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
65 lines
2.3 KiB
65 lines
2.3 KiB
8 years ago
|
using UnityEngine;
|
||
8 years ago
|
using UnityEngine.UI;
|
||
8 years ago
|
|
||
|
namespace Fungus
|
||
|
{
|
||
|
/// <summary>
|
||
|
/// Presents multiple choice buttons to the players.
|
||
|
/// </summary>
|
||
|
public interface IMenuDialog
|
||
|
{
|
||
8 years ago
|
/// <summary>
|
||
|
/// A cached list of button objects in the menu dialog.
|
||
|
/// </summary>
|
||
|
/// <value>The cached buttons.</value>
|
||
|
Button[] CachedButtons { get; }
|
||
|
|
||
|
/// <summary>
|
||
|
/// A cached slider object used for the timer in the menu dialog.
|
||
|
/// </summary>
|
||
|
/// <value>The cached slider.</value>
|
||
|
Slider CachedSlider { get; }
|
||
|
|
||
8 years ago
|
/// <summary>
|
||
|
/// Sets the active state of the Menu Dialog gameobject.
|
||
|
/// </summary>
|
||
|
void SetActive(bool state);
|
||
|
|
||
8 years ago
|
/// <summary>
|
||
|
/// Clear all displayed options in the Menu Dialog.
|
||
|
/// </summary>
|
||
|
void Clear();
|
||
|
|
||
|
/// <summary>
|
||
|
/// Hides any currently displayed Say Dialog.
|
||
|
/// </summary>
|
||
|
void HideSayDialog();
|
||
|
|
||
8 years ago
|
/// <summary>
|
||
|
/// Adds the option to the list of displayed options.
|
||
|
/// Will cause the Menu dialog to become visible if it is not already visible.
|
||
|
/// </summary>
|
||
|
/// <returns><c>true</c>, if the option was added successfully.</returns>
|
||
|
/// <param name="text">The option text to display on the button.</param>
|
||
|
/// <param name="interactable">If false, the option is displayed but is not selectable.</param>
|
||
|
/// <param name="targetBlock">Block to execute when the option is selected.</param>
|
||
|
bool AddOption(string text, bool interactable, Block targetBlock);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Show a timer during which the player can select an option.
|
||
|
/// </summary>
|
||
|
/// <param name="duration">The duration during which the player can select an option.</param>
|
||
|
/// <param name="targetBlock">Block to execute if the player does not select an option in time.</param>
|
||
|
void ShowTimer(float duration, Block targetBlock);
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns true if the Menu Dialog is currently displayed.
|
||
|
/// </summary>
|
||
|
bool IsActive();
|
||
|
|
||
|
/// <summary>
|
||
|
/// Returns the number of currently displayed options.
|
||
|
/// </summary>
|
||
|
int DisplayedOptionsCount { get; }
|
||
|
}
|
||
|
}
|