using UnityEngine;
using System.Collections;
using TMPro;
using UnityEngine.UI;
///
/// This component is responsible for having paging with a next and prev buttons.
/// It enables/disables the buttons according to whether there are more pages to go through
/// Each page is a GameObject, which is activated when the user is paging.
/// The next/prev buttons need to send a message to this component accordingly (OnNextPageButtonMsg and OnPrevPageButtonMsg).
/// For sending such a message the buttons can easily use UIButtonMessage component.
///
public class PagingDialog : MonoBehaviour
{
public GameObject[] pages;
public GameObject prevButton, nextButton;
private Button prevButtonUI, nextButtonUI;
public bool WinCondomPages;
public TextMeshProUGUI LabelPages;
int _currentPageIndex;
void Start()
{
prevButtonUI = prevButton.GetComponent