Ejemplo n.º 1
0
 public PictureBox(APNGTexture pic)
     : base(pic)
 {
     StopTime = TimeSpan.Zero;
     TransitionOnTime = TimeSpan.Zero;
     TransitionOffTime = TimeSpan.Zero;
     CanInterrupt = false;
 }
Ejemplo n.º 2
0
        /// <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);
        }
Ejemplo n.º 3
0
        /// <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);
        }
Ejemplo n.º 4
0
 public TransitionBox(APNGTexture current)
 {
     Textures.Add("current", current);
     Textures.Add("new", null);
 }