SoonerRobotics / scrabby

The Sooner Competitive Robotics simulator
https://sim.soonerrobotics.org/
4 stars 0 forks source link

Manual enabled doesn't persist through main menu pauses #31

Closed danielbrownmsm closed 4 days ago

danielbrownmsm commented 4 days ago

Steps to reproduce:

  1. Start scrabby
  2. pause
  3. change the value of manual control
  4. unpause
  5. verify that change went through
  6. pause
  7. click main menu
  8. on main menu enable manual control
  9. start scrabby
  10. notice that manual control is disabled
  11. nevermind I know what the problem is

the checkbox on the main menu should display the current value of all the settings instead of assuming everything starts false. what is happening is that manual control is being enabled on pause menu, then go to main menu and it's still enabled, but main menu doesn't update the values of the checkboxes, so it looks disabled, so then if you click it thinking it's disabled when in reality it's enabled, you toggle it to be disabled so then it doesn't work right when you click play again.

so basically fix is to set the values of the fields in MenuUI.cs based on what is in SettingsManager. might need to throw an OnLoad() or something trigger to call OnEnable() just in case, depending on what sneaky stuff unity is doing

should make a separate issue to make the main menu reset stuff to defaults or something maybe, though I think that's covered in #27

danielbrownmsm commented 4 days ago

fixed