PistonDevelopers / Piston-Tutorials

Tutorials for Piston
545 stars 89 forks source link

Fixes #225 (multiple digits) issue. #228

Closed joshuabenuck closed 4 years ago

joshuabenuck commented 4 years ago

The problem identified in #225 is that the entire rendered font texture is being rendered in each cell instead of just the part with the desired digit.

If you look at what the implementation of Text does, you will see, it renders a sub rect of the character texture when drawing a character.

This PR applies the same technique to only draw a single character in each cell.

bvssvni commented 4 years ago

Looks good.

bvssvni commented 4 years ago

Merging.

bvssvni commented 4 years ago

Thanks!