Skip to content

Commit

Permalink
Merge pull request #46 from designer-edu/scenes
Browse files Browse the repository at this point in the history
Working scenes
  • Loading branch information
acbart committed Nov 5, 2023
2 parents 85ece51 + 933c95c commit b0ff581
Show file tree
Hide file tree
Showing 18 changed files with 713 additions and 220 deletions.
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -129,3 +129,5 @@ dmypy.json

# Pyre type checker
.pyre/

examples/graphs/
7 changes: 7 additions & 0 deletions change_log.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
Change Log
==========

# Version 0.6.0

* Allow simple layer values like 'top' and 'bottom' instead of requiring colon offsets
* `change_scene`, `push_scene`, and `pop_scene` now work!
* Use weakrefs for scenes and objects to avoid memory leaks
* Transition from "window" terminology back to "scenes"

# Version 0.5.0

* Allow inheritance for fields
Expand Down
27 changes: 17 additions & 10 deletions designer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
from os import environ

environ['PYGAME_HIDE_SUPPORT_PROMPT'] = '1'
__version__ = '0.5.0'
__version__ = '0.6.0'

# For `debug` support on Mac, we need to preload tkinter
from designer.system import setup_debug_mode
Expand All @@ -25,20 +25,29 @@

__all__ = [
'__version__',
'circle', 'ellipse',
'arc', 'line',
'rectangle',
'text',
'shape', 'lines', 'pen',
'circle', 'ellipse', 'Circle', 'Ellipse',
'arc', 'line', 'Arc', 'Line',
'rectangle', "Rectangle",
'text', "Text",
'shape', 'lines', 'pen', "Shape", "Pen",
'background_image',
'image', 'emoji',
'image', 'emoji', "Image", "Emoji",
'group',
'draw',
# Window information
'set_window_color', 'get_window_color',
'set_window_size',
'set_background_image', 'set_window_image',
'get_background_image', 'get_window_image',
'get_height', 'get_window_height',
'get_width', 'get_window_width',
'set_window_title', 'get_window_title', 'set_window_image',
'get_window_layers', 'set_window_layers',
# Scene information
'set_scene_image', 'get_scene_image',
'set_scene_color', 'get_scene_color',
'get_scene_height', 'get_scene_width',
'set_scene_layers', 'get_scene_layers',
# Events
'when', 'starting', 'updating', 'typing', 'clicking',
'start', 'debug',
Expand All @@ -51,9 +60,7 @@
'above', 'below', 'beside',
# Director stuff
'get_director',
# Window stuff
'set_window_title', 'get_window_title', 'set_window_image',
'get_window_layers', 'set_window_layers',
'change_scene', 'push_scene', 'pop_scene',
# Keyboard stuff
'get_keyboard_repeat', 'set_keyboard_repeat',
'get_keyboard_delay', 'set_keyboard_delay',
Expand Down
2 changes: 1 addition & 1 deletion designer/core/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from designer.core.director import *
from designer.core.event import *
from designer.core.window import Window
from designer.core.scene import Scene
from designer.core.internal_image import InternalImage, DesignerSurface
Loading

0 comments on commit b0ff581

Please sign in to comment.