Exemplo n.º 1
0
        public Slider(Vector2 positionOfTrackFirstValue, double widthInPixels, double minimum = 0, double maximum = 1, Orientation orientation = UI.Orientation.Horizontal)
        {
            sliderTextWidget = new TextWidget("", 0, 0, justification: Justification.Center);
            sliderTextWidget.AutoExpandBoundsToText = true;
            AddChild(sliderTextWidget);

            View = new SlideView(this);
            OriginRelativeParent = positionOfTrackFirstValue;
            TotalWidthInPixels   = widthInPixels;
            Orientation          = orientation;
            Minimum     = minimum;
            Maximum     = maximum;
            ThumbWidth  = 10;
            ThumbHeight = 20;

            MinimumSize = new Vector2(Width, Height);
        }
Exemplo n.º 2
0
		public Slider(Vector2 positionOfTrackFirstValue, double widthInPixels, double minimum = 0, double maximum = 1, Orientation orientation = UI.Orientation.Horizontal)
		{
			sliderTextWidget = new TextWidget("", 0, 0, justification: Justification.Center);
			sliderTextWidget.AutoExpandBoundsToText = true;
			AddChild(sliderTextWidget);

			View = new SlideView(this);
			OriginRelativeParent = positionOfTrackFirstValue;
			TotalWidthInPixels = widthInPixels;
			Orientation = orientation;
			Minimum = minimum;
			Maximum = maximum;
			ThumbWidth = 10;
			ThumbHeight = 20;

			MinimumSize = new Vector2(Width, Height);
		}