Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Replace PySimpleGUI with Tkinter for Python GUI #130

Merged
merged 27 commits into from
Nov 25, 2024

Conversation

moon-jam
Copy link
Contributor

@moon-jam moon-jam commented Nov 18, 2024

PySimpleGUI now requires a paid license for commercial use, and annual renewal for hobbyists starting from version 5. To avoid these costs and ensure long-term project stability, this PR replaces PySimpleGUI with Tkinter, which is free and included in Python’s standard library.

Fixes #105

Changes

  • Remove pysimplegui and replace with tkinter based gui
  • Games
    • Implement ledris based on pygame
    • Implement snake based on pygame
    • Remove getkey based snake
    • Add back getkey based snake (breaks the commandline snake)
  • GUI functionality
    • Split up into tabs to make the window smaller
    • Add firmware update tab and embed binary into windows EXE
    • Fix threading in dynamic tab
  • Enhancements (for future versions)

Screenshots

ledmatrixgui-home
ledmatrixgui-game
ledmatrixgui-dynamic
ledmatrixgui-firmware

moon-jam and others added 19 commits November 25, 2024 12:16
Signed-off-by: Daniel Schaefer <[email protected]>
I don't like the styling. And if we do want to change the styling we
should use the built-in styling/theming facility instead of building it
from scratch.
https://tkdocs.com/tutorial/styles.html

Signed-off-by: Daniel Schaefer <[email protected]>
Users don't usually need it, move it away.

Signed-off-by: Daniel Schaefer <[email protected]>
Creates a window and draws on it

Signed-off-by: Daniel Schaefer <[email protected]>
Draws on all that are connected.

Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
- Include downloaded releases
- Fix exe name

Signed-off-by: Daniel Schaefer <[email protected]>
We removed the function earlier, and then introduced it back, but with
different arguments.

Signed-off-by: Daniel Schaefer <[email protected]>
Otherwise the cli snake is broken

Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
Signed-off-by: Daniel Schaefer <[email protected]>
Copy link
Member

@JohnAZoidberg JohnAZoidberg left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks a lot! I think we're ready to migrate :D

- Make pygame an optional dependency
- Avoid the pygame hello print on startup

```
pygame 2.6.1 (SDL 2.28.4, Python 3.13.0)
Hello from the pygame community. https://www.pygame.org/contribute.html
```

Signed-off-by: Daniel Schaefer <[email protected]>
They're not really useful to the average user.

Signed-off-by: Daniel Schaefer <[email protected]>
pyinstaller just runs the script, so we need to make the default, the
gui.

Signed-off-by: Daniel Schaefer <[email protected]>
@JohnAZoidberg JohnAZoidberg merged commit 14eb5df into FrameworkComputer:main Nov 25, 2024
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ledmatrixctl depends on library that requires licence key
2 participants