36 lines
1.1 KiB
C#
36 lines
1.1 KiB
C#
using System.Collections;
|
|
using System.Collections.Generic;
|
|
using System.Linq;
|
|
using UnityEngine;
|
|
using UnityEngine.Serialization;
|
|
|
|
namespace Ichni.StartMenu
|
|
{
|
|
public class ThemeBundleSelector : MonoBehaviour
|
|
{
|
|
public GameObject themeBundleTab;
|
|
public RectTransform listTransform;
|
|
public List<ThemeBundleTab> themeBundleTabs;
|
|
|
|
private void Start()
|
|
{
|
|
SetUpList();
|
|
}
|
|
|
|
private void SetUpList()
|
|
{
|
|
themeBundleTabs = new List<ThemeBundleTab>();
|
|
foreach (var bundle in ThemeBundleManager.instance.themeBundleAbstractList)
|
|
{
|
|
ThemeBundleTab tab = Instantiate(themeBundleTab, listTransform).GetComponent<ThemeBundleTab>();
|
|
tab.SetUpTab(bundle);
|
|
themeBundleTabs.Add(tab);
|
|
}
|
|
}
|
|
|
|
public List<string> GetSelectedThemeBundleList()
|
|
{
|
|
return (from tab in themeBundleTabs where tab.toggle.isOn select tab.connectedThemeBundle.fileName).ToList();
|
|
}
|
|
}
|
|
} |