allenfrostline / Poker

Poker: A Simple Poker GUI in Python
15 stars 2 forks source link

[Enhancement] Proving user feedback during the "Freeze" portion #2

Open MikeTheWatchGuy opened 5 years ago

MikeTheWatchGuy commented 5 years ago

Mentioned in the readme was:

Freeze at start. The app starts and then freezes for a sec. This is because Python is openning the hand value table. Perhaps I should try threading for this particular task (no need for the rest of the game). I'll also try to compress the table in a better way (like functionize it).

There are a couple of things you can do so that it doesn't look like it's frozen.

  1. Show a progress bar while it's loading, providing an update on when it'll finish
  2. Show an animated "loading" GIF while loading

Both require you to make periodic calls into PySimpleGUI while you're doing your lengthy operation, so it will require some integrating of this part of your code with the GUI module.

Both methods can be done with a single line of code added to your code. If you your the animated Popup call then you only need that one line and you can use the Single Line Progress Meter call for a progress meter.

Of course you can do your own fancier stuff too.

allenfrostline commented 5 years ago

Gotha. Will give animated Popup a try