本文整理汇总了C#中dfControl.GetIsVisibleRaw方法的典型用法代码示例。如果您正苦于以下问题:C# dfControl.GetIsVisibleRaw方法的具体用法?C# dfControl.GetIsVisibleRaw怎么用?C# dfControl.GetIsVisibleRaw使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类dfControl
的用法示例。
在下文中一共展示了dfControl.GetIsVisibleRaw方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: renderControl
private void renderControl( ref dfRenderData buffer, dfControl control, uint checksum, float opacity )
{
// Don't render controls that are not currently active
if( !control.enabled || !control.gameObject.activeSelf )
return;
// Don't render controls that are invisible. Keeping a running
// accumulator for opacity allows us to know a control's final
// calculated opacity
var effectiveOpacity = opacity * control.Opacity;
if( effectiveOpacity <= 0.001f )
{
return;
}
// If this control has a dfRenderGroup component on it, then pass off all
// responsibility for rendering that control to the component.
var renderGroup = GetRenderGroupForControl( control, true );
if( renderGroup != null && renderGroup != this && renderGroup.enabled )
{
renderGroups.Add( renderGroup );
renderGroup.Render( renderCamera, control, groupOccluders, groupControls, checksum, effectiveOpacity );
return;
}
// Don't render controls that have the IsVisible flag set to FALSE. Note that this is tested
// *after* checking for the presence of a dfRenderGroup component, since that component (if
// present) will need to update its own internal state if the control's IsVisible property
// has changed.
if( !control.GetIsVisibleRaw() )
return;
// Grab the current clip region information off the stack
var clipInfo = clipStack.Peek();
// Update the checksum to include the current control
checksum = dfChecksumUtil.Calculate( checksum, control.Version );
// Retrieve the control's bounds, which will be used in intersection testing
// and triangle clipping.
var bounds = control.GetBounds();
var screenRect = control.GetScreenRect();
var occluder = getControlOccluder( ref screenRect, control );
// Indicates whether the control was not rendered because it fell outside
// of the currently-active clipping region
var wasClipped = false;
if( !( control is IDFMultiRender ) )
{
// Ask the control to render itself and return a buffer of the
// information needed to render it as a Mesh
var controlData = control.Render();
if( controlData != null )
{
processRenderData( ref buffer, controlData, ref bounds, ref screenRect, checksum, clipInfo, ref wasClipped );
}
}
else
{
// Ask the control to render itself and return as many dfRenderData buffers
// as needed to render all elements of the control as a Mesh
var childBuffers = ( (IDFMultiRender)control ).RenderMultiple();
if( childBuffers != null )
{
var buffers = childBuffers.Items;
var bufferCount = childBuffers.Count;
for( int i = 0; i < bufferCount; i++ )
{
var childBuffer = buffers[ i ];
if( childBuffer != null )
{
processRenderData( ref buffer, childBuffer, ref bounds, ref screenRect, checksum, clipInfo, ref wasClipped );
}
}
}
}
// Allow control to keep track of its clipping state
control.setClippingState( wasClipped );
// Keep track of which controls are rendered, and where they appear on-screen
groupOccluders.Add( occluder );
groupControls.Add( control );
// If the control has the "Clip child controls" option set, push
// its clip region information onto the stack so that all controls
// lower in the hierarchy are clipped against that region.
if( control.ClipChildren )
{
//.........这里部分代码省略.........