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

Upstreaming v9 #14

Merged
merged 15 commits into from
Aug 1, 2020
Merged

Upstreaming v9 #14

merged 15 commits into from
Aug 1, 2020

Conversation

quozl
Copy link
Contributor

@quozl quozl commented Jul 14, 2020

Some changes in the Python 2 branch are potentially useful for the Python 3 branch.

quozl added 15 commits July 14, 2020 14:44
Possibly these were an intention to implement game pause on alt-tab.
Variable is not used anywhere else, so remove it.
No reason to force the title, as it is forced already by BlockParty.
Same font is used for more than score, so stop calling it a scorefont.
Clutter of logs, and did not add any value
Method has no caller.
A port to GTK 3 should have changed the expose callback to a draw
callback, using the supplied cairo.Context.

Possibly reduces display update CPU cost.

Regression introduced 6af29a1
Port to GTK 3 did not complete all porting.

Now possible again to run the game using "python3 BlockParty.py"
Vanishing cursor helps to avoid distraction, but it was lost in the port
to GTK 3.

Get the saved cursor from the window after it is realized.

Flush the cursor change through Gdk.

Keep the timer source identifier.

When the activity is closing, stop the timer and audio player, otherwise
the timer may trigger and VanishingCursor may try to restore the cursor
while there is no window for the Gtk.DrawingArea, yielding traceback.
Sugar has a configuration setting for font face and size, so use it
rather than a pre-coded face and size.

Also scale according to display size relative to the 900 pixel width of
the OLPC XO-1.
We're odd, because we draw on Gtk.Window.  Makes it impossible to add a
Sugar toolbar.  Instead, let's draw on the new Gtk.DrawingArea widget.
Also avoid dropping unhandled key press events (return True), as it
prevented the ctrl+q stop accelerator from working.
Adjust height by the expected size of the toolbar.
Icon is the "T" tetronimo, upside down, with extra gap between the
squares.

Squares in the icon were not distributed evenly across the available
dimensions, and the shape centre was above and to the right of the icon
centre.
@JuiP
Copy link
Member

JuiP commented Jul 21, 2020

I think the changes I made in #12 should also be included in the last released python2 version of the activity as they aren't porting related changes. Can someone with rights to change master branch include them before port to python3? @quozl @chimosky

@quozl
Copy link
Contributor Author

quozl commented Jul 21, 2020

I don't have rights to change master yet. But you can see your changes in my Python 2 branch underneath my changes, and in the master branch. So I think what you ask is already done.

@quozl quozl marked this pull request as ready for review July 21, 2020 05:50
@JuiP
Copy link
Member

JuiP commented Jul 21, 2020

Yes, thankyou :)

@chimosky
Copy link
Member

Reviewed, thanks.

I think that since an activity toolbar has been added, the use of the escape key to quit the game should be changed to pause the game because sometimes one might decide to pause the game and not want to quit it when pressing the escape key and I've pressed it thinking it'll pause it quite a number of times.

@quozl
Copy link
Contributor Author

quozl commented Jul 24, 2020

Thanks. I don't agree to change the escape key because users have already learned what it does, so an update would frustrate them. I have no idea how you came to the conclusion that the escape key would pause the game, given that the words "Press ESC to exit" are shown.

@JuiP
Copy link
Member

JuiP commented Jul 24, 2020

Regarding adding a pause button: I don't think we should add one because then the child can pause the game, think where to place the upcoming block and again resume. This gives the child more time to think than needed and defeats the purpose of the activity: quick thinking for block rotation and placement.

@quozl
Copy link
Contributor Author

quozl commented Jul 28, 2020

I don't think anyone is adding a pause button.

@chimosky
Copy link
Member

Agreed, I'd looked at it from a different perspective earlier.

@chimosky chimosky merged commit f90db4b into sugarlabs:master Aug 1, 2020
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.

None yet

3 participants