Skip to content

Instantly share code, notes, and snippets.

@MartinZikmund
Created December 19, 2025 22:52
Show Gist options
  • Select an option

  • Save MartinZikmund/b33d96114ebdd1a675548d34a214dcc8 to your computer and use it in GitHub Desktop.

Select an option

Save MartinZikmund/b33d96114ebdd1a675548d34a214dcc8 to your computer and use it in GitHub Desktop.
if (IsInFireButton(position) && !_firePointerId.HasValue)
{
_firePointerId = pointerId;
SetFirePressed(true);
CapturePointer(e.Pointer);
e.Handled = true;
return;
}
if (IsInUseButton(position) && !_usePointerId.HasValue)
{
_usePointerId = pointerId;
SetUsePressed(true);
CapturePointer(e.Pointer);
e.Handled = true;
return;
}
if (IsInMenuButton(position))
{
SendKeyPress(DoomKey.Escape);
e.Handled = true;
return;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment