示例#1
0
void CFlashUIMCVisibleBaseNode::GetValues( IUIElement* pElement, bool &bVisible, float &alpha )
{
	IFlashVariableObject* pMc = pElement->GetMovieClip( GetObjectDesc(), GetTmplDesc());
	if (pMc)
	{
		SFlashDisplayInfo info;
		pMc->GetDisplayInfo(info);
		bVisible = info.GetVisible();
		alpha    = info.GetAlpha() / 100.f;
	}
}
示例#2
0
//------------------------------------------------------------------------
int CScriptBind_UIAction::IsVisible( IFunctionHandler *pH, const char * elementName, int instanceID, const char * mcName )
{
	IUIElement* pElement = GetElement( elementName, instanceID );
	if ( pElement )
	{
		IFlashVariableObject* pMC = pElement->GetMovieClip( mcName );
		if ( pMC )
		{
			SFlashDisplayInfo info;
			pMC->GetDisplayInfo( info );
			return pH->EndFunction( info.GetVisible() );
		}
		UIACTION_WARNING( "LUA: Element %s has no movieclip %s", elementName, mcName );
	}
	else
	{
		UIACTION_WARNING( "LUA: UIElement %s does not exist", elementName );
	}
	return pH->EndFunction( false );
}