Esempio n. 1
0
 void buildGumpling(int x, int y, int width, int minValue, int maxValue, int value, HSliderBarStyle style)
 {
     Position = new Point(x, y);
     MinValue = minValue;
     MaxValue = maxValue;
     BarWidth = width;
     Value    = value;
     Style    = style;
 }
Esempio n. 2
0
 void buildGumpling(int x, int y, int width, int minValue, int maxValue, int value, HSliderBarStyle style)
 {
     Position = new Point(x, y);
     MinValue = minValue;
     MaxValue = maxValue;
     BarWidth = width;
     Value = value;
     Style = style;
 }
Esempio n. 3
0
        public HSliderBar(int x, int y, int w, int min, int max, int value, HSliderBarStyle style, bool hasText = false, byte font = 0, ushort color = 0, bool unicode = true, bool drawUp = false)
        {
            X = x;
            Y = y;

            if (hasText)
            {
                _text   = RenderedText.Create(string.Empty, color, font, unicode);
                _drawUp = drawUp;
            }

            MinValue         = min;
            MaxValue         = max;
            BarWidth         = w;
            _style           = style;
            AcceptMouseInput = true;


            if (_gumpWidget == null)
            {
                switch (_style)
                {
                case HSliderBarStyle.MetalWidgetRecessedBar:

                    _gumpSpliderBackground = new UOTexture32[3]
                    {
                        GumpsLoader.Instance.GetTexture(213), GumpsLoader.Instance.GetTexture(214), GumpsLoader.Instance.GetTexture(215)
                    };

                    _gumpWidget = GumpsLoader.Instance.GetTexture(216);

                    break;

                case HSliderBarStyle.BlueWidgetNoBar:
                    _gumpWidget = GumpsLoader.Instance.GetTexture(0x845);

                    break;
                }

                Width = BarWidth;

                if (_gumpWidget != null)
                {
                    Height = _gumpWidget.Height;
                }

                //RecalculateSliderX();
                CalculateOffset();
            }

            Value = value;
        }
Esempio n. 4
0
        public HSliderBar(int x, int y, int w, int min, int max, int value, HSliderBarStyle style, bool hasText = false, byte font = 0, ushort color = 0, bool unicode = true, bool drawUp = false)
        {
            X = x;
            Y = y;

            if (hasText)
            {
                _text   = RenderedText.Create(string.Empty, color, font, unicode);
                _drawUp = drawUp;
            }

            MinValue         = min;
            MaxValue         = max;
            BarWidth         = w;
            Value            = value;
            _style           = style;
            AcceptMouseInput = true;
        }
Esempio n. 5
0
        public HSliderBar
        (
            int x,
            int y,
            int w,
            int min,
            int max,
            int value,
            HSliderBarStyle style,
            bool hasText = false,
            byte font    = 0,
            ushort color = 0,
            bool unicode = true,
            bool drawUp  = false
        )
        {
            X = x;
            Y = y;

            if (hasText)
            {
                _text   = RenderedText.Create(string.Empty, color, font, unicode);
                _drawUp = drawUp;
            }

            MinValue         = min;
            MaxValue         = max;
            BarWidth         = w;
            _style           = style;
            AcceptMouseInput = true;

            var texture = GumpsLoader.Instance.GetGumpTexture((uint)(_style == HSliderBarStyle.MetalWidgetRecessedBar ? 216 : 0x845), out var bounds);

            Width = BarWidth;

            if (texture != null)
            {
                Height = bounds.Height;
            }

            CalculateOffset();

            Value = value;
        }
Esempio n. 6
0
        public HSliderBar(int x, int y, int w, int min, int max, int value, HSliderBarStyle style, bool hasText = false, byte font = 0, ushort color = 0, bool unicode = true)
        {
            X = x;
            Y = y;

            if (hasText)
            {
                _text = new RenderedText
                {
                    Font = font, Hue = color, IsUnicode = unicode
                };
            }

            MinValue         = min;
            MaxValue         = max;
            BarWidth         = w;
            Value            = value;
            _style           = style;
            AcceptMouseInput = true;
        }
Esempio n. 7
0
 public HSliderBar(AControl parent, int x, int y, int width, int minValue, int maxValue, int value, HSliderBarStyle style)
     : this(parent)
 {
     buildGumpling(x, y, width, minValue, maxValue, value, style);
 }
Esempio n. 8
0
 public HSliderBar(AControl parent, int x, int y, int width, int minValue, int maxValue, int value, HSliderBarStyle style)
     : this(parent)
 {
     buildGumpling(x, y, width, minValue, maxValue, value, style);
 }