41 lines
973 B
C#
41 lines
973 B
C#
|
using SHADE;
|
|||
|
using System;
|
|||
|
using System.Collections.Generic;
|
|||
|
using System.Linq;
|
|||
|
using System.Text;
|
|||
|
using System.Threading.Tasks;
|
|||
|
|
|||
|
namespace SHADE_Scripting.UI
|
|||
|
{
|
|||
|
public class MultiImageListControlButton: Script
|
|||
|
{
|
|||
|
public bool isNext = true;
|
|||
|
public GameObject multiImageList;
|
|||
|
|
|||
|
protected override void awake()
|
|||
|
{
|
|||
|
|
|||
|
UIElement ui = GetComponent<UIElement>();
|
|||
|
if (ui != null)
|
|||
|
{
|
|||
|
ui.OnRelease.RegisterAction(() =>
|
|||
|
{
|
|||
|
|
|||
|
MultiImageList imageList = multiImageList.GetScript<MultiImageList>();
|
|||
|
if(imageList != null)
|
|||
|
{
|
|||
|
|
|||
|
if (isNext)
|
|||
|
imageList.NextImage();
|
|||
|
else
|
|||
|
imageList.PrevImage();
|
|||
|
|
|||
|
}
|
|||
|
|
|||
|
});
|
|||
|
}
|
|||
|
}
|
|||
|
|
|||
|
}
|
|||
|
}
|