1
This commit is contained in:
@@ -12,12 +12,23 @@ namespace BITKit.UX
|
||||
public TranslucentVisualElement()
|
||||
{
|
||||
RegisterCallback<GeometryChangedEvent>(OnGeometryChanged);
|
||||
generateVisualContent += DrawCanvas;
|
||||
}
|
||||
|
||||
private void DrawCanvas(MeshGenerationContext obj)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
private void OnGeometryChanged(GeometryChangedEvent evt)
|
||||
{
|
||||
#if UNITY_EDITOR
|
||||
if (BITAppForUnity.IsPlaying is false) return;
|
||||
#endif
|
||||
if (style.display.value is not DisplayStyle.Flex) return;
|
||||
style.backgroundImage = new StyleBackground(Background.FromRenderTexture(TranslucentService.BlurredScreen));
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user