24 lines
501 B
Plaintext
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;
|
|
} |