-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUtageUguiSceneGalleryItem.cs
65 lines (59 loc) · 1.82 KB
/
UtageUguiSceneGalleryItem.cs
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
using System;
using System.Runtime.CompilerServices;
using UnityEngine;
using UnityEngine.Events;
using UnityEngine.UI;
using Utage;
[AddComponentMenu("Utage/TemplateUI/SceneGalleryItem")]
public class UtageUguiSceneGalleryItem : MonoBehaviour
{
private AdvSceneGallerySettingData data;
public AdvUguiLoadGraphicFile texture;
public Text title;
public void Init(AdvSceneGallerySettingData data, Action<UtageUguiSceneGalleryItem> ButtonClickedEvent, AdvSystemSaveData saveData)
{
<Init>c__AnonStorey0 storey = new <Init>c__AnonStorey0 {
ButtonClickedEvent = ButtonClickedEvent,
$this = this
};
this.data = data;
Button component = base.GetComponent<Button>();
component.get_onClick().AddListener(new UnityAction(storey, (IntPtr) this.<>m__0));
bool flag = saveData.GalleryData.CheckSceneLabels(data.ScenarioLabel);
component.set_interactable(flag);
if (!flag)
{
this.texture.get_gameObject().SetActive(false);
if (this.title != null)
{
this.title.set_text(string.Empty);
}
}
else
{
this.texture.get_gameObject().SetActive(true);
this.texture.LoadTextureFile(data.ThumbnailPath);
if (this.title != null)
{
this.title.set_text(data.Title);
}
}
}
public AdvSceneGallerySettingData Data
{
get
{
return this.data;
}
}
[CompilerGenerated]
private sealed class <Init>c__AnonStorey0
{
internal UtageUguiSceneGalleryItem $this;
internal Action<UtageUguiSceneGalleryItem> ButtonClickedEvent;
internal void <>m__0()
{
this.ButtonClickedEvent(this.$this);
}
}
}