Convert Control to ContainerControl.

This commit is contained in:
Jean-Baptiste Perrier
2021-03-17 20:53:42 +01:00
parent fb70368c8d
commit c8b57d417c
7 changed files with 13 additions and 13 deletions

View File

@@ -5,7 +5,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Border control that draws the border around the control edges (inner and outer sides).
/// </summary>
public class Border : Control
public class Border : ContainerControl
{
/// <summary>
/// Gets or sets the color used to draw border lines.
@@ -30,9 +30,9 @@ namespace FlaxEngine.GUI
}
/// <inheritdoc />
public override void Draw()
public override void DrawSelf()
{
base.Draw();
base.DrawSelf();
Render2D.DrawRectangle(new Rectangle(Vector2.Zero, Size), BorderColor, BorderWidth);
}

View File

@@ -7,7 +7,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Button control
/// </summary>
public class Button : Control
public class Button : ContainerControl
{
/// <summary>
/// The default height fro the buttons.
@@ -171,7 +171,7 @@ namespace FlaxEngine.GUI
}
/// <inheritdoc />
public override void Draw()
public override void DrawSelf()
{
// Cache data
Rectangle clientRect = new Rectangle(Vector2.Zero, Size);

View File

@@ -8,7 +8,7 @@ namespace FlaxEngine.GUI
/// Progress bar control shows visual progress of the action or set of actions.
/// </summary>
/// <seealso cref="FlaxEngine.GUI.Control" />
public class ProgressBar : Control
public class ProgressBar : ContainerControl
{
/// <summary>
/// The value.
@@ -160,9 +160,9 @@ namespace FlaxEngine.GUI
}
/// <inheritdoc />
public override void Draw()
public override void DrawSelf()
{
base.Draw();
base.DrawSelf();
float progressNormalized = (_current - _minimum) / _maximum;
if (progressNormalized > 0.001f)

View File

@@ -105,7 +105,7 @@ namespace FlaxEngine.GUI
}
/// <inheritdoc />
public override void Draw()
public override void DrawSelf()
{
// Draw cached texture
if (_texture && !_invalid && !_isDuringTextureDraw)
@@ -119,7 +119,7 @@ namespace FlaxEngine.GUI
}
// Draw default UI directly
base.Draw();
base.DrawSelf();
}
/// <inheritdoc />

View File

@@ -220,7 +220,7 @@ namespace FlaxEngine.GUI
}
/// <inheritdoc />
public override void Draw()
public override void DrawSelf()
{
// Cache data
var rect = new Rectangle(Vector2.Zero, Size);

View File

@@ -132,7 +132,7 @@ namespace FlaxEngine.GUI
}
/// <inheritdoc />
public override void Draw()
public override void DrawSelf()
{
// Cache data
var rect = new Rectangle(Vector2.Zero, Size);

View File

@@ -9,7 +9,7 @@ namespace FlaxEngine.GUI
/// <summary>
/// Base class for all text box controls which can gather text input from the user.
/// </summary>
public abstract class TextBoxBase : Control
public abstract class TextBoxBase : ContainerControl
{
/// <summary>
/// The text separators (used for words skipping).