-
-
Notifications
You must be signed in to change notification settings - Fork 63
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added bunch of SDL_Window* functions #278
Conversation
I'm definitely in favour of adding these! I just need to give some thought to the naming/API consistency - will try to give a proper review in the next day or two. |
Co-authored-by: Joe Clay <[email protected]>
Okay, I finally got round to reviewing this, and made the following tweaks:
I've merged this PR manually with my tweaks included (b2a1022), so closing this now :) |
@Tairesh @17cupsofcoffee |
@sumibi-yakitori: If you (or anyone else) are ever considering a PR but aren't sure if it'd get accepted, please open an issue or a discussion thread - I'm always happy to do a bit of research and let you know my thoughts 🙂 I'm usually happy to expose SDL2 functionality as long as there's a good use case for it and the API isn't miles away from what other windowing libraries have available - for example, I don't think all other windowing libraries have built-in 'center the window' functionality, but it'd not be too difficult to build it on top of their functions for getting the monitor size/setting the window position. |
OK, I'll do that next time! |
@sumibi-yakitori: I would like to make Tetra WASM-compatible in the future (I actually have a prototype branch of it!), but desktop is probably going to remain the main focus, and I wouldn't be opposed to having stuff that's desktop-only as long as it's clearly documented. |
I don't know if it is necessary for anyone else, but I needed some SDL functions like SDL_SetWindowPosition that Tetra currently doesn't provide, so I added some of them. I'm a very inexperienced Rust programmer so I may have just made some mess and nonsense, but if it would be useful I'd be glad to share this. Also sorry for my English.