using System; using System.Collections.Generic; using System.Linq; using System.Text; using DW.UI; namespace DW.UI.ScreenObjects { /// /// Used to display image sequences /// Depricated: Unsupported code base may be removed at future point /// public class ImageSpinner_old : ScreenObject { /// /// Array of images /// public ImageDisplay[] images; /// /// Index of active image /// public int activeIndex; /// /// Constructor /// /// Size of Image Display public ImageSpinner_old(int size) { this.activeIndex = 0; this.images = new ImageDisplay[size]; } /// /// Add an image to our array /// /// Image /// Location public void addImage(ImageDisplay val, int slot) { images[slot] = val; } /// /// Iterate to next image /// public void next() { if (this.images.Length <= this.activeIndex + 1) { this.activeIndex = 0; } else { this.activeIndex++; } } /// /// Iterate to previous image /// public void prev() { if (this.activeIndex == 0) { this.activeIndex = this.images.Length - 1; } else { this.activeIndex--; } } } }