SecondHalfGames / yakui

yakui is a declarative Rust UI library for games
Apache License 2.0
237 stars 21 forks source link

Types for Different Coordinate Spaces #57

Open LPGhatguy opened 2 years ago

LPGhatguy commented 2 years ago

We've had a few bugs from dealing with coordinates in the wrong space, like physical vs logical pixels.

Winit has PhysicalSize and LogicalSize types to help with this. I think we could make a little generic wrapper for each coordinate space to help make sure we're getting these things right.