public PictureBox(APNGTexture pic) : base(pic) { StopTime = TimeSpan.Zero; TransitionOnTime = TimeSpan.Zero; TransitionOffTime = TimeSpan.Zero; CanInterrupt = false; }
/// <summary> /// 响应用户鼠标点击,显示对应材质并发出事件。 /// </summary> public Button(APNGTexture normal, APNGTexture hover, APNGTexture pressed, APNGTexture disabled) { if (normal == null) throw new ArgumentException("normal texture must not null."); Textures.Add("normal", normal); Textures.Add("hover", hover); Textures.Add("pressed", pressed); Textures.Add("disabled", disabled); }
/// <summary> /// 带有一个滑块的滚动条,能发出滚动事件。 /// </summary> public Slider(Vector3 size, bool isHorizontal, APNGTexture thumb, APNGTexture thumbHover) { this.isHorizontal = isHorizontal; Textures.Add("thumb", thumb); Textures.Add("thumb_hover", thumbHover); thumbRectangle = thumb.CurrentFrame.Bounds; thumbRectangle.Location = new Point((int)size.X, (int)size.Y); if (isHorizontal) Bounds = new Rectangle((int)size.X, (int)size.Y, (int)size.Z, thumb.CurrentFrame.Height); else Bounds = new Rectangle((int)size.X, (int)size.Y, thumb.CurrentFrame.Width, (int)size.Z); }
public TransitionBox(APNGTexture current) { Textures.Add("current", current); Textures.Add("new", null); }