Support for decimal positions and sizes, window position control, and on_quit callback #126
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
I added the ability to set images, sprites, and text to be positioned and scaled using decimal (GLfloat) values, for a much smoother experience when moving and resizing.
I also added a on_close callback to the window, to allow applications to confirm closing and do cleanup.
Added positional control for where the window is created.
Also made a num_images member on the sprite struct, to allow easier control of sprites by the user, even though it is not used internally.
Added the key's scancode to the S2D events for keys in the value field.
And I added these things to the docs in the Readme.md.
I also made a small but very effective change to not flush the vertex buffer if it is empty. This way if only images are being drawn no time is wasted trying to flush an empty buffer. In my app it almost doubled FPS. If there are triangles, the z ordering is still conserved like normal.
There should be no breaking changes to the library, just some added features.