Example #1
0
 public IndexImageWatcher(string name, List <Image> frames, int x, int y, bool center, int width, int height, List <T> targets)
     : base(name, frames, x, y, center, width, height, default(T))
 {
     Targets    = targets;
     updateFunc = Comparator.GetComparator <T>(Comparator.Type.EQUAL);
 }
Example #2
0
        protected void AddIndexItem <T>(int x, int y, int scale, string name, string icon, Comparator.Type comparator, List <T> targets) where T : struct, IComparable
        {
            List <Image> images;

            icons.TryGetValue(icon, out images);
            if (images != null)
            {
                items.Add(name, new IndexImageWatcher <T>(name, images, x + 1, y + 1, false, images[0].Height * scale, images[0].Width * scale, targets, Comparator.GetComparator <T>(comparator)));
            }
        }
Example #3
0
        protected void AddFlagIndexItem <T>(int x, int y, int scale, string name, string field, List <T> targets, bool set = true) where T : struct, IComparable
        {
            List <Image> images;

            icons.TryGetValue(name, out images);
            if (images != null)
            {
                items.Add(name, new IndexImageWatcher <T>(field, images, x + 1, y + 1, false, images[0].Height * scale, images[0].Width * scale, targets, Comparator.TestFlag <T>(set)));
            }
        }
Example #4
0
        protected void AddItem <T>(int x, int y, int scale, string name, Comparator.Type comparator, T target = default(T)) where T : struct, IComparable
        {
            List <Image> images;

            icons.TryGetValue(name, out images);
            if (images != null)
            {
                items.Add(name, new BoolImageWatcher <T>(name, images, x + 1, y + 1, false, images[0].Height * scale, images[0].Width * scale, target, Comparator.GetComparator <T>(comparator)));
            }
        }