-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathGeneral.cs
38 lines (33 loc) · 1.45 KB
/
General.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
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace SpriteSheetBuilder
{
public static class General
{
public static uint FramesCount = 0;
public static int ImageWidth = -1;
public static int ImageHeight = -1;
public static List<uint> SelectedFramesId = new List<uint>();
public static List<FrameControl> SelectedFramesControls = new List<FrameControl>();
public static List<FrameControl> FramesControls = new List<FrameControl>();
public static List<Controles.AnimationControl> Animations = new List<Controles.AnimationControl>();
public static List<uint> SelectedAnimationFramesId = new List<uint>();
public static List<uint> SelectedAnimationSelectedFramesId = new List<uint>();
public static int SelectedAnimation = -1;
public static List<string> GetAnimationsNames()
{
List<string> names = new List<string>();
for (int i = 0; i < Animations.Count; i++)
names.Add(Animations[i].Name);
return names;
}
public static List<Controles.AnimationFrameControl> GetAnimationFrames(int index)
{
if (index < 0 || index > Animations.Count) return new List<Controles.AnimationFrameControl>();
return Animations[index].lbxAnimations.Items.Cast<Controles.AnimationFrameControl>().ToList();
}
}
}