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

View File

@@ -7,7 +7,7 @@ namespace FlaxEngine.GUI
/// <summary> /// <summary>
/// Button control /// Button control
/// </summary> /// </summary>
public class Button : Control public class Button : ContainerControl
{ {
/// <summary> /// <summary>
/// The default height fro the buttons. /// The default height fro the buttons.
@@ -171,7 +171,7 @@ namespace FlaxEngine.GUI
} }
/// <inheritdoc /> /// <inheritdoc />
public override void Draw() public override void DrawSelf()
{ {
// Cache data // Cache data
Rectangle clientRect = new Rectangle(Vector2.Zero, Size); 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. /// Progress bar control shows visual progress of the action or set of actions.
/// </summary> /// </summary>
/// <seealso cref="FlaxEngine.GUI.Control" /> /// <seealso cref="FlaxEngine.GUI.Control" />
public class ProgressBar : Control public class ProgressBar : ContainerControl
{ {
/// <summary> /// <summary>
/// The value. /// The value.
@@ -160,9 +160,9 @@ namespace FlaxEngine.GUI
} }
/// <inheritdoc /> /// <inheritdoc />
public override void Draw() public override void DrawSelf()
{ {
base.Draw(); base.DrawSelf();
float progressNormalized = (_current - _minimum) / _maximum; float progressNormalized = (_current - _minimum) / _maximum;
if (progressNormalized > 0.001f) if (progressNormalized > 0.001f)

View File

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

View File

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

View File

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

View File

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