コード例 #1
0
 protected internal override void OnMouseMove(int X, int Y, MouseButtons mb)
 {
     if (Gumps.Capture == this)
     {
         Point point    = ((Gump)this.m_Target).PointToScreen(new Point(0, 0));
         Point point2   = base.PointToScreen(new Point(X, Y));
         int   minWidth = ((point2.X - point.X) + 6) - this.m_xOffset;
         if (minWidth < this.m_Target.MinWidth)
         {
             minWidth = this.m_Target.MinWidth;
         }
         else if (minWidth > this.m_Target.MaxWidth)
         {
             minWidth = this.m_Target.MaxWidth;
         }
         int minHeight = ((point2.Y - point.Y) + 6) - this.m_yOffset;
         if (minHeight < this.m_Target.MinHeight)
         {
             minHeight = this.m_Target.MinHeight;
         }
         else if (minHeight > this.m_Target.MaxHeight)
         {
             minHeight = this.m_Target.MaxHeight;
         }
         this.m_Target.Width  = minWidth;
         this.m_Target.Height = minHeight;
         Engine.Redraw();
     }
 }
コード例 #2
0
ファイル: GAlphaVSlider.cs プロジェクト: uotools/PlayUO
        public void Slide(int Y)
        {
            Gumps.Capture = this;
            int    position = this.m_Position;
            double old      = this.GetValue();

            this.m_Position = Y;
            if (this.m_Position < 0)
            {
                this.m_Position = 0;
            }
            else if (this.m_Position >= this.m_Height)
            {
                this.m_Position = this.m_Height - 1;
            }
            double num3 = (this.m_End - this.m_Start) + 1.0;

            num3 -= 1E-13;
            double num4 = ((double)this.m_Position) / ((double)(this.m_Height - 1));
            double num5 = num4 * num3;

            num5 += this.m_Start;
            num5  = (int)num5;
            if (position != this.m_Position)
            {
                if (this.m_OnValueChange != null)
                {
                    this.m_OnValueChange(num5, old, this);
                }
                Engine.Redraw();
            }
        }
コード例 #3
0
        protected void Roll_OnTick(Timer t)
        {
            double normalized = this.m_Sync.Normalized;

            this.Height = this.m_From + ((int)((this.m_To - this.m_From) * normalized));
            Engine.Redraw();
            if (normalized >= 1.0)
            {
                this.m_Timer.Stop();
                if (this.m_Expanding)
                {
                    this.m_Expanded   = true;
                    this.m_Expanding  = false;
                    this.m_Compacted  = false;
                    this.m_Compacting = false;
                }
                else if (this.m_Compacting)
                {
                    this.m_Expanded   = false;
                    this.m_Expanding  = false;
                    this.m_Compacted  = true;
                    this.m_Compacting = false;
                }
                else
                {
                    this.m_Expanded   = false;
                    this.m_Expanding  = false;
                    this.m_Compacted  = false;
                    this.m_Compacting = false;
                }
            }
        }
コード例 #4
0
ファイル: GObjectProperties.cs プロジェクト: uotools/PlayUO
        protected void Roll_OnTick(Timer t)
        {
            double num;
            double elapsed = this.m_Sync.Elapsed;

            if (elapsed < this.m_WidthDuration)
            {
                num         = elapsed / this.m_WidthDuration;
                this.Width  = 2 + ((int)(num * (this.m_TotalWidth - 2)));
                this.Height = this.m_CompactHeight;
            }
            else
            {
                num = (elapsed - this.m_WidthDuration) / this.m_HeightDuration;
                if (num >= 1.0)
                {
                    if (this.m_Timer != null)
                    {
                        this.m_Timer.Stop();
                    }
                    this.m_Timer = null;
                    this.Width   = this.m_TotalWidth;
                    this.Height  = this.m_TotalHeight;
                }
                else
                {
                    this.Width  = this.m_TotalWidth;
                    this.Height = this.m_CompactHeight + ((int)(num * (this.m_TotalHeight - this.m_CompactHeight)));
                }
            }
            Engine.Redraw();
        }
コード例 #5
0
 protected internal override void OnMouseMove(int X, int Y, MouseButtons mb)
 {
     if (Gumps.Capture == this)
     {
         Point point    = ((Gump)this.m_Target).PointToScreen(new Point(0, this.m_Target.Height));
         Point point2   = base.PointToScreen(new Point(X, Y));
         int   minWidth = ((point2.X - point.X) + 6) - this.m_xOffset;
         if (minWidth < this.m_Target.MinWidth)
         {
             minWidth = this.m_Target.MinWidth;
         }
         else if (minWidth > this.m_Target.MaxWidth)
         {
             minWidth = this.m_Target.MaxWidth;
         }
         bool flag = false;
         int  num2 = point.Y - (point2.Y - this.m_yOffset);
         if (num2 < this.m_Target.MinHeight)
         {
             flag = true;
         }
         else if (num2 > this.m_Target.MaxHeight)
         {
             flag = true;
         }
         if (!flag)
         {
             this.m_Target.Height    = num2;
             ((Gump)this.m_Target).Y = point2.Y - this.m_yOffset;
         }
         this.m_Target.Width = minWidth;
         Engine.Redraw();
     }
 }
コード例 #6
0
ファイル: GLResizer.cs プロジェクト: uotools/PlayUO
 protected internal override void OnMouseMove(int X, int Y, MouseButtons mb)
 {
     if (Gumps.Capture == this)
     {
         Point point  = ((Gump)this.m_Target).PointToScreen(new Point(this.m_Target.Width, 0));
         Point point2 = base.PointToScreen(new Point(X, Y));
         int   num    = point.X - (point2.X - this.m_xOffset);
         if ((num >= this.m_Target.MinWidth) && (num <= this.m_Target.MaxWidth))
         {
             this.m_Target.Width     = num;
             ((Gump)this.m_Target).X = point2.X - this.m_xOffset;
             Engine.Redraw();
         }
     }
 }
コード例 #7
0
 protected internal override void OnMouseMove(int X, int Y, MouseButtons mb)
 {
     if (Gumps.Capture == this)
     {
         Point point  = ((Gump)this.m_Target).PointToScreen(new Point(0, this.m_Target.Height));
         Point point2 = base.PointToScreen(new Point(X, Y));
         int   num    = point.Y - (point2.Y - this.m_yOffset);
         if ((num >= this.m_Target.MinHeight) && (num <= this.m_Target.MaxHeight))
         {
             this.m_Target.Height    = num;
             ((Gump)this.m_Target).Y = point2.Y - this.m_yOffset;
             Engine.Redraw();
         }
     }
 }
コード例 #8
0
 protected internal override void OnMouseMove(int X, int Y, MouseButtons mb)
 {
     if (Gumps.Capture == this)
     {
         Point point  = ((Gump)this.m_Target).PointToScreen(new Point(this.m_Target.Width, this.m_Target.Height));
         Point point2 = base.PointToScreen(new Point(X, Y));
         int   num    = point.X - (point2.X - this.m_xOffset);
         bool  flag   = false;
         bool  flag2  = false;
         if (num < this.m_Target.MinWidth)
         {
             flag = true;
         }
         else if (num > this.m_Target.MaxWidth)
         {
             flag = true;
         }
         if (!flag)
         {
             this.m_Target.Width     = num;
             ((Gump)this.m_Target).X = point2.X - this.m_xOffset;
             flag2 = true;
         }
         flag = false;
         int num2 = point.Y - (point2.Y - this.m_yOffset);
         if (num2 < this.m_Target.MinHeight)
         {
             flag = true;
         }
         else if (num2 > this.m_Target.MaxHeight)
         {
             flag = true;
         }
         if (!flag)
         {
             this.m_Target.Height    = num2;
             ((Gump)this.m_Target).Y = point2.Y - this.m_yOffset;
             flag2 = true;
         }
         if (flag2)
         {
             Engine.Redraw();
         }
     }
 }
コード例 #9
0
ファイル: GHuePickerAll.cs プロジェクト: uotools/PlayUO
        private void ChangeShade(int X, int Y)
        {
            int xShade = this.m_xShade;
            int yShade = this.m_yShade;
            int zShade = this.m_zShade;

            this.m_xShade = X / this.xSize;
            this.m_yShade = Y / this.ySize;
            this.m_zShade = this.m_yShade / 10;
            this.m_yShade = this.m_yShade % 10;
            if (((this.m_xShade != xShade) || (this.m_yShade != yShade)) || (this.m_zShade != zShade))
            {
                if (this.m_OnHueSelect != null)
                {
                    this.m_OnHueSelect(this.Hue, this);
                }
                Engine.Redraw();
            }
        }
コード例 #10
0
ファイル: GSlider.cs プロジェクト: uotools/PlayUO
        public void Slide(int X)
        {
            Gumps.Capture = this;
            int    position = this.m_Position;
            double old      = this.GetValue();
            int    num3     = X;

            this.m_Position = X;
            if (this.m_Position < 0)
            {
                this.m_Position = 0;
            }
            else if (this.m_Position >= this.m_Width)
            {
                this.m_Position = this.m_Width - 1;
            }
            double num4 = (this.m_End - this.m_Start) + 1.0;

            num4 -= 1E-13;
            double num5 = ((double)this.m_Position) / ((double)(this.m_Width - 1));

            if (this.m_Position == 0)
            {
                num5 = 0.0;
            }
            else if (this.m_Position == (this.m_Width - 1))
            {
                num5 = 1.0;
            }
            double num6 = num5 * num4;

            num6 += this.m_Start;
            num6  = (int)num6;
            if (((old != num6) || (position != this.m_Position)) || (num3 != position))
            {
                if (this.m_OnValueChange != null)
                {
                    this.m_OnValueChange(num6, old, this);
                }
                Engine.Redraw();
            }
        }
コード例 #11
0
ファイル: GHuePicker.cs プロジェクト: uotools/PlayUO
        private void ChangeShade(int X, int Y)
        {
            int xShade = this.m_xShade;
            int yShade = this.m_yShade;

            this.m_xShade = X / 8;
            this.m_yShade = Y / 8;
            if ((this.m_xShade != xShade) || (this.m_yShade != yShade))
            {
                if (this.m_OnHueSelect != null)
                {
                    this.m_OnHueSelect(this.Hue, this);
                }
                if (Engine.GMPrivs)
                {
                    ((Tooltip)base.m_Tooltip).Text = string.Format("0x{0:X}", this.Hue);
                }
                Engine.Redraw();
            }
        }
コード例 #12
0
 protected internal override void Draw(int x, int y)
 {
     if ((this.m_xLast != x) || (this.m_yLast != y))
     {
         this.m_xLast = x;
         this.m_yLast = y;
         Clipper clipper = new Clipper(x + 0x20, y + 0x42, 0xc4, 0x5c);
         this.m_ContentClipper = clipper;
         foreach (Gump gump in base.m_Children.ToArray())
         {
             if (gump is GBuyGump_OfferedItem)
             {
                 ((GBuyGump_OfferedItem)gump).Clipper = clipper;
             }
         }
     }
     if ((this.m_Signature != null) && (this.m_SignatureAnimation != null))
     {
         double normalized = this.m_SignatureAnimation.Normalized;
         if (normalized >= 1.0)
         {
             this.m_Signature.Scissor(null);
             this.m_SignatureAnimation = null;
         }
         else
         {
             this.m_Signature.Scissor(0, 0, (int)(normalized * this.m_Signature.Width), this.m_Signature.Height);
         }
         Engine.Redraw();
     }
     if (this.m_LastHeight >= 0)
     {
         this.m_yOffset = 0x43 - ((int)((this.m_Slider.GetValue() / 50.0) * this.m_LastHeight));
     }
     else
     {
         this.m_yOffset = 0x43;
     }
     this.m_LastOffset = 0x43 - this.m_yOffset;
     base.Draw(x, y);
 }
コード例 #13
0
        private void Slide(int Y)
        {
            Gumps.Capture = this;
            if (Y < 0)
            {
                Y = 0;
            }
            if (Y >= this.m_Height)
            {
                Y = this.m_Height - 1;
            }
            int    position = this.m_Position;
            double old      = this.GetValue();

            this.m_Position = Y;
            if (position != Y)
            {
                if (this.m_OnValueChange != null)
                {
                    this.m_OnValueChange(this.GetValue(), old, this);
                }
                Engine.Redraw();
            }
        }