Pause#58
Conversation
adamhutchings
left a comment
There was a problem hiding this comment.
One change, one possible change
adamhutchings
left a comment
There was a problem hiding this comment.
Some minor code organization.
| QUIT, | ||
| } | ||
|
|
||
| impl ButtonType { |
There was a problem hiding this comment.
I feel like this needs to be a callback instead of an enum. Allows much more easily for the creation of one-time buttons should we ever need them. Example from the near future: list of worlds to load
There was a problem hiding this comment.
nah i disagree, rust enums are crazy OP and they can pretty much do whatever the heck you want
There was a problem hiding this comment.
Rust enums can contain a string value like:
#[derive(Clone, Copy, PartialEq)]
enum ButtonType {
BTG,
QUIT,
WORLD(String)
}There was a problem hiding this comment.
Possibly, but I still think it should be neater than a match statement to raw blocks of code. At least have back_to_game() and quit() functions defined that can be called by a match statement
There was a problem hiding this comment.
yeah that seems reasonable; ill probably do a refactor once this pr is ready to review / feature complete
There was a problem hiding this comment.
you could always add an enum variant with a callback function as a parameter if you want to support callback functions
|
In terms of functionality, this is great though |
|
The fullscreen toggle breaks hovering and clicking buttons on my machine; not sure if this is specific to my setup. Would appreciate test results! |
adamhutchings
left a comment
There was a problem hiding this comment.
Pull from main with the new tests to make sure that CI isn't broken (I know how much you love that!)
adamhutchings
left a comment
There was a problem hiding this comment.
Some small changes.
Also, on a more serious note, this has a bug on macOS -- when I test and press "back to game", I snap to looking directly vertically.
|
Yeah, the camera snapping is an issue for me too. Something with the way SDL handles mouse position. |
|
Re: the camera snapping, isn't this exactly why we got rid of GLFW? |
We got rid of GLFW because it had some weird bugs with exiting fullscreen; I think switching to SDL now brings some quirks when locking the cursor |
mileskerr
left a comment
There was a problem hiding this comment.
we have to merge this for the sake of future generations
|
sdl is obviously a bust lets merge this and then i'll start work on getting glfw to work again |
This reverts commit 6eaa2b5.
|
Still build errors with: |
JakeRoggenbuck
left a comment
There was a problem hiding this comment.
Works after installing pkg-config! No issue with window size either





Uh oh!
There was an error while loading. Please reload this page.