forked from hedyorg/hedy
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUG] Pygame features not working (hedyorg#4039)
* Fix Pygame prefix * [pre-commit.ci] auto fixes from pre-commit.com hooks for more information, see https://pre-commit.ci --------- Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: mergify[bot] <37929162+mergify[bot]@users.noreply.github.com>
- Loading branch information
1 parent
475ace6
commit 981ea4b
Showing
5 changed files
with
42 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,17 @@ | ||
# coding=utf8 | ||
|
||
import os | ||
import pygame | ||
|
||
os.environ["SDL_VIDEODRIVER"] = "dummy" # No real image drivers exist, set to dummy for testing | ||
os.environ["SDL_AUDIODRIVER"] = "disk" # No real audio drivers exist, set to disk for testing | ||
import pygame # noqa F401 | ||
import buttons # noqa F401 | ||
|
||
pygame.init() | ||
canvas = pygame.display.set_mode((711, 300)) | ||
canvas.fill(pygame.Color(247, 250, 252, 255)) | ||
pygame_end = True # Set to True so that we don't get stuck in a loop during testing' | ||
|
||
pygame_end = False | ||
button_list = [] | ||
|
||
|
||
def create_button(name): | ||
if name not in button_list: | ||
button_list.append(name) | ||
buttons.add(name) |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters