public SlideBar(float minV, float maxV, float value, ETypeOrientation type) { this.minV = minV; MaxV_ = maxV; Type = type; Value = value; if (Type == ETypeOrientation.Horizontal) { Slider_ = new SlideBarSlider(ETypeOrientation.Horizontal); HorizontalStyle = EElementStyle.Stretch; VerticalStyle = EElementStyle.Fit; Size.width = 10; Size.height = 20; Slider_.Size.width = (uint)Math.Max((Size.width - 4) * 0.1f, 4); Slider_.Size.height = 16; Slider_.Position.X = (int)(((Size.width - 4) - Slider_.Size.width) * Value + 2); Slider_.Position.Y = 2; Slider_.SetSlideBar(this); } else { Slider_ = new SlideBarSlider(ETypeOrientation.Vertical); HorizontalStyle = EElementStyle.Fit; VerticalStyle = EElementStyle.Stretch; Size.width = 20; Size.height = 10; Slider_.Size.width = 16; Slider_.Size.height = (uint)Math.Max((Size.height - 4) * 0.1f, 4); Slider_.Position.X = 2; Slider_.Position.Y = (int)(((Size.height - 4) - Slider_.Size.height) * Value + 2); Slider_.SetSlideBar(this); } }
public SlideBar(float minV, float maxV, float value, ETypeOrientation type) { this.minV = minV; MaxV_ = maxV; Type = type; Value = value; if (Type == ETypeOrientation.Horizontal) { Slider_ = new SlideBarSlider(ETypeOrientation.Horizontal); HorizontalStyle = EElementStyle.Stretch; VerticalStyle = EElementStyle.Fit; Size.width = 10; Size.height = 20; Slider_.Size.width = (uint)Math.Max((Size.width - 4) * 0.1f, 4); Slider_.Size.height = 16; Slider_.Position.X = (int)(((Size.width - 4) - Slider_.Size.width) * Value + 2); Slider_.Position.Y = 2; Slider_.SetSlideBar(this); } else { Slider_ = new SlideBarSlider(ETypeOrientation.Vertical); HorizontalStyle = EElementStyle.Fit; VerticalStyle = EElementStyle.Stretch; Size.width = 20; Size.height = 10; Slider_.Size.width = 16; Slider_.Size.height = (uint)Math.Max((Size.height - 4) * 0.1f, 4); Slider_.Position.X = 2; Slider_.Position.Y = (int)(((Size.height - 4) - Slider_.Size.height) * Value + 2); Slider_.SetSlideBar(this); } }
public ProgressBar(float min, float max, float value, ETypeOrientation orientation) { this.min = min; this.max = max; Type = orientation; Size = GetPreferedSize(); Value = value; if (orientation == ETypeOrientation.Horizontal) { HorizontalStyle = EElementStyle.Stretch; VerticalStyle = EElementStyle.Fit; } else { HorizontalStyle = EElementStyle.Fit; VerticalStyle = EElementStyle.Stretch; } Pack(); }
public ProgressBar(float min, float max, float value, ETypeOrientation orientation) { this.min = min; this.max = max; Type = orientation; Size = GetPreferedSize(); Value = value; if (orientation == ETypeOrientation.Horizontal) { HorizontalStyle = EElementStyle.Stretch; VerticalStyle = EElementStyle.Fit; } else { HorizontalStyle = EElementStyle.Fit; VerticalStyle = EElementStyle.Stretch; } Pack(); }
public ProgressBar(float min, float max, ETypeOrientation orientation) : this(min, max, 0, orientation) { }
public ProgressBar(ETypeOrientation orientation) : this(0, 100f, orientation) { }
public ProgressBar(float min, float max, ETypeOrientation orientation) : this(min, max, 0, orientation) { }
public ProgressBar(ETypeOrientation orientation) : this(0, 100f, orientation) { }
public SlideBar(float minV, float maxV, ETypeOrientation type) : this(minV, maxV, 0, type) { }
public SlideBar(ETypeOrientation type) : this(0, 100f, type) { }
public SlideBarSlider(ETypeOrientation type) { Type = type; }
public SlideBar(float minV, float maxV, ETypeOrientation type) : this(minV, maxV, 0, type) { }
public SlideBar(ETypeOrientation type) : this(0, 100f, type) { }
public SlideBarSlider(ETypeOrientation type) { Type = type; }