ethanmoffat / EndlessClient

An open source client for Endless Online written in C#
MIT License
34 stars 16 forks source link

Major rework of how controls handle input. References XNAControls rewrite for event-driven input. #296

Closed ethanmoffat closed 1 year ago

ethanmoffat commented 1 year ago

Instead of each game component individually checking for input events, XNAControls input manager checks for input events and sends messages to the control that should handle them.

This involved completely rewriting event handling in most UI elements. Click detection for map elements is centralized in a single class (ClickDispatcher). MouseOver event handling is unchanged.

ClickHandled property on UserInputRepository is now removed as it is no longer needed. Clicks no longer get sent to multiple controls, so this hack was removed in favor of migrating all UI elements to use event-driven input.

This PR addresses the following bugs: Closes #164 Closes #255 Closes #256

It also paves the way for a more sensible approach to resizable display (#225)