You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

43 lines
911 B
C#

4 years ago
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.UI;
using SiegeSong;
namespace SiegeSong {
public class OptionsListSelect : MonoBehaviour
{
public string[] Options;
public int SelectedIndex;
public Text TextDisplay;
public void Start()
{
}
public void Update()
{
}
public void NextIndex()
{
if (SelectedIndex == Options.Length)
SelectedIndex = 0;
else
SelectedIndex++;
TextDisplay.text = Options[SelectedIndex];
}
public void PreviousIndex()
{
if (SelectedIndex == 0)
SelectedIndex = Options.Length;
else
SelectedIndex--;
TextDisplay.text = Options[SelectedIndex];
}
}
}