You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently the settings are read on startup https://github.com/Lea-fish/Leafish/blob/main/src/main.rs#L217 and then passed along through the entire application. This works but is complicated and annoying, you don't want to pass such a global thing around everywhere. It would instead be nice to be able to do settings::get(<setting>) to get the value, from anywhere in the code.
For example settings::get(auth::CL_USERNAME) should return you the username used.
Also currently the settings reading and saving is done inside src/console/mod.rs which seems like the wrong place to do such a thing. Instead that should focus entirely on the console of the game, and let the settings module do it's work itself.
The text was updated successfully, but these errors were encountered:
Currently the settings are read on startup https://github.com/Lea-fish/Leafish/blob/main/src/main.rs#L217 and then passed along through the entire application. This works but is complicated and annoying, you don't want to pass such a global thing around everywhere. It would instead be nice to be able to do
settings::get(<setting>)
to get the value, from anywhere in the code.For example
settings::get(auth::CL_USERNAME)
should return you the username used.Also currently the settings reading and saving is done inside
src/console/mod.rs
which seems like the wrong place to do such a thing. Instead that should focus entirely on the console of the game, and let the settings module do it's work itself.The text was updated successfully, but these errors were encountered: