Facepunch / sbox-issues

176 stars 12 forks source link

PanelComponent Mouse Events do not trigger when the dependency is provided. #5483

Open SlashedAsteroid opened 6 months ago

SlashedAsteroid commented 6 months ago

Describe the bug

When triggering a mouse event from inside a razor file providing the dependency of MousePanelEvent results in the event not firing, it needs to be passed as a PanelEvent and then cast inside the function.

The events I've tried this on:

onclick onmousedown onrightclick

To Reproduce

See images provided

Expected behavior

The event should trigger if MousePanelEvent is provided as the dependency.

Media/Files

image

image

Additional context

No response

SlashedAsteroid commented 6 months ago

This seems to occur for both the Panel and PanelComponent.