Пример #1
0
 public PictureBox(APNGTexture pic)
     : base(pic)
 {
     StopTime = TimeSpan.Zero;
     TransitionOnTime = TimeSpan.Zero;
     TransitionOffTime = TimeSpan.Zero;
     CanInterrupt = false;
 }
Пример #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);
        }
Пример #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);
        }
Пример #4
0
 public TransitionBox(APNGTexture current)
 {
     Textures.Add("current", current);
     Textures.Add("new", null);
 }