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); }
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))); } }
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))); } }
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))); } }