Unstable 0.17.0.0
This commit is contained in:
@@ -47,9 +47,9 @@ namespace Barotrauma
|
||||
}
|
||||
isHorizontal = (Rect.Width > Rect.Height);
|
||||
frame = new GUIFrame(new RectTransform(Vector2.One, rectT));
|
||||
GUI.Style.Apply(frame, "", this);
|
||||
GUIStyle.Apply(frame, "", this);
|
||||
slider = new GUIFrame(new RectTransform(Vector2.One, rectT));
|
||||
GUI.Style.Apply(slider, "Slider", this);
|
||||
GUIStyle.Apply(slider, "Slider", this);
|
||||
this.showFrame = showFrame;
|
||||
this.barSize = barSize;
|
||||
Enabled = true;
|
||||
@@ -62,10 +62,10 @@ namespace Barotrauma
|
||||
public Rectangle GetSliderRect(float fillAmount)
|
||||
{
|
||||
Rectangle sliderArea = new Rectangle(
|
||||
frame.Rect.X + (int)style.Padding.X,
|
||||
frame.Rect.Y + (int)style.Padding.Y,
|
||||
(int)(frame.Rect.Width - style.Padding.X - style.Padding.Z),
|
||||
(int)(frame.Rect.Height - style.Padding.Y - style.Padding.W));
|
||||
frame.Rect.X + (int)Style.Padding.X,
|
||||
frame.Rect.Y + (int)Style.Padding.Y,
|
||||
(int)(frame.Rect.Width - Style.Padding.X - Style.Padding.Z),
|
||||
(int)(frame.Rect.Height - Style.Padding.Y - Style.Padding.W));
|
||||
|
||||
Vector4 sliceBorderSizes = Vector4.Zero;
|
||||
if (slider.sprites.ContainsKey(slider.State) && (slider.sprites[slider.State].First()?.Slice ?? false))
|
||||
@@ -116,10 +116,10 @@ namespace Barotrauma
|
||||
|
||||
var sliderRect = GetSliderRect(barSize);
|
||||
|
||||
slider.RectTransform.AbsoluteOffset = new Point((int)style.Padding.X, (int)style.Padding.Y);
|
||||
slider.RectTransform.AbsoluteOffset = new Point((int)Style.Padding.X, (int)Style.Padding.Y);
|
||||
slider.RectTransform.MaxSize = new Point(
|
||||
(int)(Rect.Width - style.Padding.X + style.Padding.Z),
|
||||
(int)(Rect.Height - style.Padding.Y + style.Padding.W));
|
||||
(int)(Rect.Width - Style.Padding.X + Style.Padding.Z),
|
||||
(int)(Rect.Height - Style.Padding.Y + Style.Padding.W));
|
||||
frame.Visible = showFrame;
|
||||
slider.Visible = BarSize > 0.0f;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user