Files
FlaxEngine/Source/Engine/UI/GUI/Panels/HScrollBar.cs
2023-01-10 15:29:37 +01:00

31 lines
1.0 KiB
C#

// Copyright (c) 2012-2023 Wojciech Figat. All rights reserved.
namespace FlaxEngine.GUI
{
/// <summary>
/// Horizontal scroll bar control.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.ScrollBar" />
[HideInEditor]
public class HScrollBar : ScrollBar
{
/// <summary>
/// Initializes a new instance of the <see cref="HScrollBar"/> class.
/// </summary>
/// <param name="parent">The parent control.</param>
/// <param name="y">The y position.</param>
/// <param name="width">The width.</param>
/// <param name="height">The height.</param>
public HScrollBar(ContainerControl parent, float y, float width, float height = DefaultSize)
: base(Orientation.Horizontal)
{
AnchorPreset = AnchorPresets.HorizontalStretchBottom;
Parent = parent;
Bounds = new Rectangle(0, y, width, height);
}
/// <inheritdoc />
protected override float TrackSize => Width;
}
}