Files
LuckerGame/code/UI/HudComponents/CameraCursor.razor
2023-08-03 21:32:33 -07:00

24 lines
501 B
Plaintext

@using System
@using LuckerGame.Components.Lucker.Cameras
@using Sandbox
@using Sandbox.UI
@namespace LuckerGame.UI.HudComponents
@attribute [StyleSheet]
@inherits Panel
<root>
@if (ShouldShowCursor)
{
<div class="cursor-catch"></div>
}
</root>
@code {
protected override int BuildHash()
{
return HashCode.Combine(ShouldShowCursor);
}
private bool ShouldShowCursor => Game.LocalClient.Pawn?.Components.Get<AbstractCamera>()?.ShouldShowCursor ?? false;
}