public ScreenManager(Engine game) : base(game) { TraceEnabled = false; _input = new InputState(); }
public virtual void HandleInput(InputState input) { if (input.MouseState.IsMouseIn(Position, Size)) { _isHovered = true; if (!_playedHoverSound && HoverSound != null) { HoverSound.Play(); _playedHoverSound = true; } if (input.LeftMouseClicked) { OnClicked(); } } else { _isHovered = false; _playedHoverSound = false; } }