Mouse State not being correctly handled.
Alphablackwolf opened this issue ยท 3 comments
The constructor for the eventargs on mouse changed is not setting the PriorState correctly. The mouse coordinates for the prior state keep coming back as (0,0).
Additionally, it seems the mouse location is not being handled correctly when there is a zoom.
Confirmed:
e.PriorState
is always empty;- the mouse (x, y) coordinates aren't adjusted for zoom level.
I'll look into this for the SMAPI 1.0 release.
The e.PriorState
being empty is fixed in the upcoming 1.0 release. This affected multiple events:
event | issue |
---|---|
ControlEvents.KeyboardChanged |
The prior state was always equal to the new state. |
ControlEvents.MouseChanged |
The prior state was always zero. |
PlayerEvents.FarmerChanged |
The prior and new values were always null. |
TimeEvents.TimeOfDayChanged TimeEvents.DayOfMonthChanged TimeEvents.YearOfGameChanged |
The prior and new values were always zero. |
The mouse-changed event now includes zoom-adjusted mouse positions in the upcoming 1.0 release:
property | type | summary |
---|---|---|
PriorState NewState |
MouseState |
The game's mouse state, including the actual mouse position. |
PriorPosition NewPosition |
Point |
(new) The mouse position adjusted for the game's zoom level. |