1using System.Collections.Generic;
16 public List<string>
ids =
new List<string>();
20 foreach (
string id in ids)
24 if (!File.Exists(path))
26 EClass.
ui.Say(
"Full Image not found: " + path);
29 if (!File.Exists(path +
"_t"))
31 EClass.
ui.Say(
"Thumbnail not found: " + path);
34 UIItem uIItem = n.AddItem(
"ItemGallery");
38 Texture2D texture2D = IO.LoadPNG(path +
"_t");
39 sprite = Sprite.Create(texture2D,
new Rect(0f, 0f, texture2D.width, texture2D.height),
new Vector2(0.5f, 0.5f));
42 uIItem.image1.sprite = sprite;
43 uIItem.text1.text =
"#" + id;
44 uIItem.
button1.SetOnClick(delegate
47 SE.Play(
"click_recipe");
51 Texture2D texture2D2 = IO.LoadPNG(path, FilterMode.Trilinear);
52 sprite2 = Sprite.Create(texture2D2,
new Rect(0f, 0f, texture2D2.width, texture2D2.height),
new Vector2(0.5f, 0.5f));
65 public static Dictionary<int, Sprite>
sprites =
new Dictionary<int, Sprite>();
67 public static Dictionary<int, Sprite>
spritesFull =
new Dictionary<int, Sprite>();
104 GridLayoutGroup[] array =
grids;
105 for (
int i = 0; i < array.Length; i++)
111 list.Sort((
int a,
int b) => a - b);
112 foreach (
int item in list)
114 page.ids.Add(
item.ToString() ??
"");
115 if (page.ids.Count >= (
listMode ? 8 : 2))
121 if (page.ids.Count > 0)
148 Object.Destroy(
item.texture);
149 Object.Destroy(
item);
override void BuildNote(UINote n, string idTopic)
override void OnSwitchContent(int idTab)
static Dictionary< int, Sprite > sprites
static Dictionary< int, Sprite > spritesFull
UD_Int_String dictSketches2
static void Toggle(string idFile, string idTopic=null)
void Show(string _idFile=null, string _idTopic=null, string title=null, BookList.Item _bookItem=null)