forked from headassbtw/CustomMenuText
-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathImageManager.cs
More file actions
executable file
·51 lines (46 loc) · 1.46 KB
/
ImageManager.cs
File metadata and controls
executable file
·51 lines (46 loc) · 1.46 KB
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
using IPA.Utilities;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace CustomMenuText
{
class ImageManager
{
public static List<String> ChunkPaths = new List<String>();
public static List<CustomTypes.LogoImages> ImageChunks = new List<CustomTypes.LogoImages>();
public static void ImgInit()
{
FindOGLogo();
PathToChunks(Plugin.IMG_PATH);
}
public static void FindOGLogo()
{
CustomTypes.LogoImages li = new CustomTypes.LogoImages
{
BatLogo = Tools.GetTexture(CustomTypes.logo.bat),
E = Tools.GetTexture(CustomTypes.logo.a),
SaberLogo = Tools.GetTexture(CustomTypes.logo.saber),
name = "Default"
};
ImageChunks.Add(li);
}
public static void PathToChunks(string path)
{
foreach(var pah in FileUtils.GetFileChunks(path))
{
try
{
ImageChunks.Add(FileUtils.LoadImagesFromChunk(pah));
}
catch (NullReferenceException)
{
Plugin.Log.Notice("[ImageManager] No Image Chunks To Load!");
ImageChunks.Add(new CustomTypes.LogoImages(null, null, null, null));
}
}
}
}
}