mirror of
https://github.com/AlexMacocian/MonoGame.Extended.git
synced 2026-07-24 03:56:31 +00:00
added clipping rectangles to gui controls so that text is clipped inside the bounds of textbox
This commit is contained in:
@@ -53,7 +53,7 @@ namespace MonoGame.Extended.Gui
|
||||
var cursor = Screen.Skin?.Cursor;
|
||||
|
||||
if (cursor != null)
|
||||
_renderer.DrawRegion(cursor.TextureRegion, CursorPosition, cursor.Color);
|
||||
_renderer.DrawRegion(cursor.TextureRegion, CursorPosition, cursor.Color, null);
|
||||
}
|
||||
|
||||
_renderer.End();
|
||||
@@ -62,10 +62,7 @@ namespace MonoGame.Extended.Gui
|
||||
private void DrawChildren(GuiControlCollection controls, float deltaSeconds)
|
||||
{
|
||||
foreach (var control in controls.Where(c => c.IsVisible))
|
||||
{
|
||||
//_renderer.DrawRegion(null, control.BoundingRectangle.ToRectangle(), Color.Magenta);
|
||||
control.Draw(_renderer, deltaSeconds);
|
||||
}
|
||||
|
||||
foreach (var childControl in controls.Where(c => c.IsVisible))
|
||||
DrawChildren(childControl.Controls, deltaSeconds);
|
||||
|
||||
Reference in New Issue
Block a user