public void AddLogoLayerToScreen(int iLayer) { Rect tImageRect = GetLayerRect(iLayer, false); Rect tMaskRect = GetLayerRect(iLayer, true); LogoLayer tLayer = tLogoImage.tLayers[iLayer]; string sImageName = tLayer.GetImage(); string sMaskName = tLayer.GetMask(); Color tImageCol = iLayer == iCurrentLayer && !bSelectMask ? Color.cyan : Color.white; Color tMaskCol = iLayer == iCurrentLayer && bSelectMask ? Color.cyan : Color.white; if (sImageName.Length < 1) { sImageName = "LOGOcircle"; if (bSelectMask || iCurrentLayer != iLayer) { tImageCol = Color.black; } } if (sMaskName.Length < 1) { sMaskName = "LOGOcircle"; if (!bSelectMask || iCurrentLayer != iLayer) { tMaskCol = Color.black; } } FSprite tImageSprite = new FSprite(sImageName); FSprite tMaskSprite = new FSprite(sMaskName); tScreen.AddSprite(tImageSprite); tScreen.AddSprite(tMaskSprite); tImageSprite.width = tImageRect.width; tImageSprite.height = tImageRect.height; tImageSprite.SetPosition(tImageRect.x, tImageRect.y); tImageSprite.color = tImageCol; tMaskSprite.width = tMaskRect.width; tMaskSprite.height = tMaskRect.width; tMaskSprite.SetPosition(tMaskRect.x, tMaskRect.y); tMaskSprite.color = tMaskCol; }
public void AddLogoToScreen(float fX, float fY) { tLogoImage.tColorPrimary = tPrimary; tLogoImage.tColorSecondary = tSecondary; for (int iLayer = 0; iLayer < LogoImage.MAXLAYERS; ++iLayer) { LogoLayer tLayer = tLogoImage.tLayers[iLayer]; bool bFirst = iLayer == 0; bool bLast = iLayer == LogoImage.MAXLAYERS - 1; FMaskedSprite tSprite = new FMaskedSprite(tLayer.GetImage(), tLayer.GetMask()); tScreen.AddSprite(tSprite); float fWidth = tLogoImage.fWidth * tLayer.GetScale(); tSprite.width = fWidth; tSprite.height = fWidth; float fXOffset = tLogoImage.fWidth * tLayer.GetPosition().x; float fYOffset = tLogoImage.fWidth * tLayer.GetPosition().y; tSprite.SetPosition(fX + fXOffset, fY + fYOffset); tSprite.color = tLogoImage.GetColour(tLayer.eColour); } }