ClanGenOfficial / clangen

Warrior Cats fan game
https://clangen.io
Other
229 stars 398 forks source link

[CODE] Add loading spinner to the cat list screen #2506

Closed j-gynn closed 6 days ago

j-gynn commented 1 week ago

Description Given how long it takes to instantiate the cat list screen now (according to a timer I ran, it's anywhere from 0.5 to 2 seconds with a modest clan of 50 or so in all_cats_list), setting up the loading animation would ensure the user feels the game is continuing and not in a crash state.

Best case scenario, this could mean loading ListScreen in 2 separate chunks - the blank screen with header bar first since you can do that almost immediately, with the loading spinner that gets used in patrols (and possibly other places).

Then, whilst the loading spinner is doing its beautiful dance, we can do the rest of the load, namely:

  1. find the cats we want
  2. make all the buttons
  3. populate the buttons
  4. show all the buttons all at once

Then the loady-spinner goes away and the user can use the screen. I am fairly confident this is threading and I really do hate that, but the experience right now is Poupi Kakas (obscure reference, sorry).

Other "grievances"/potential fix sources

j-gynn commented 6 days ago

Issue resolved without the need for the loading system thanks to scribble's wonderful PR #2481 . Closing.