mImpl->mSize = size;
}
+const Vector2& ControlRenderer::GetSize() const
+{
+ return mImpl->mSize;
+}
+
+void ControlRenderer::GetNaturalSize( Vector2& naturalSize ) const
+{
+ naturalSize = Vector2::ZERO;
+}
+
void ControlRenderer::SetClipRect( const Rect<int>& clipRect )
{
mImpl->mClipRect = clipRect;
}
}
+float ControlRenderer::GetDepthIndex() const
+{
+ return mImpl->mDepthIndex;
+}
+
void ControlRenderer::SetOnStage( Actor& actor )
{
Material material = Material::New( mImpl->mShader );
void ControlRenderer::SetOffStage( Actor& actor )
{
- DoSetOffStage( actor );
+ if( mImpl->mIsOnStage )
+ {
+ DoSetOffStage( actor );
- actor.RemoveRenderer( mImpl->mRenderer );
- mImpl->mRenderer.Reset();
+ actor.RemoveRenderer( mImpl->mRenderer );
+ mImpl->mRenderer.Reset();
- mImpl->mIsOnStage = false;
+ mImpl->mIsOnStage = false;
+ }
}
void ControlRenderer::DoSetOnStage( Actor& actor )