public override void draw(Graphics graphics, float parentAlpha)
{
validate();
if (transform)
{
applyTransform(graphics, computeTransform());
}
if (_firstWidget != null && _firstWidget.isVisible())
{
var scissor = ScissorStack.calculateScissors(
stage?.camera,
graphics.batcher.transformMatrix,
_firstWidgetBounds);
if (ScissorStack.pushScissors(scissor))
{
graphics.batcher.enableScissorTest(true);
_firstWidget.draw(graphics, parentAlpha * color.A);
graphics.batcher.enableScissorTest(false);
ScissorStack.popScissors();
}
}
if (_secondWidget != null && _secondWidget.isVisible())
{
var scissor = ScissorStack.calculateScissors(
stage?.camera,
graphics.batcher.transformMatrix,
_secondWidgetBounds);
if (ScissorStack.pushScissors(scissor))
{
graphics.batcher.enableScissorTest(true);
_secondWidget.draw(graphics, parentAlpha * color.A);
graphics.batcher.enableScissorTest(false);
ScissorStack.popScissors();
}
}
_style.handle.draw(
graphics,
_handleBounds.x,
_handleBounds.y,
_handleBounds.width,
_handleBounds.height,
new Color(color, (int)(color.A * parentAlpha)));
if (transform)
{
resetTransform(graphics);
}
}