diff options
author | Joshua Minor <j@lux.vu> | 2008-09-23 16:33:20 (GMT) |
---|---|---|
committer | Joshua Minor <j@lux.vu> | 2008-09-23 16:33:20 (GMT) |
commit | e8e4cee4fcf1367b8ecfd2ebb55f47a1d3ec4860 (patch) | |
tree | ac9d535646d32b0410cdd15d9edc35e53f40a87d /Maze.activity | |
parent | 5cd3c12f9d9f6105dd7e5f0dae8b12bd8578cfdc (diff) |
Reverted a bunch of experimental stuff.
Fixed up the license information in source files and activity.info
Diffstat (limited to 'Maze.activity')
-rwxr-xr-x | Maze.activity/activity.py | 28 | ||||
-rw-r--r-- | Maze.activity/activity/activity.info | 4 | ||||
-rw-r--r-- | Maze.activity/game.py | 7 | ||||
-rw-r--r-- | Maze.activity/icons/activity-easier.svg | 15 | ||||
-rw-r--r-- | Maze.activity/icons/activity-harder.svg | 16 |
5 files changed, 3 insertions, 67 deletions
diff --git a/Maze.activity/activity.py b/Maze.activity/activity.py index 4b088c9..ceb205c 100755 --- a/Maze.activity/activity.py +++ b/Maze.activity/activity.py @@ -1,34 +1,6 @@ import olpcgames -import pygame -from sugar.graphics.toolbutton import ToolButton -from gettext import gettext as _ class MazeActivity(olpcgames.PyGameActivity): game_name = 'game' game_title = 'Maze' game_size = None # let olpcgames pick a nice size for us - - def build_toolbar( self ): - """Build our Activity toolbar for the Sugar system.""" - toolbar = super( MazeActivity, self ).build_toolbar() - - # Add buttons that will make the maze harder or easier - toolbar.harder = ToolButton('activity-harder') - toolbar.harder.set_tooltip(_('Harder')) - toolbar.harder.connect('clicked', self._harder_cb) - toolbar.insert(toolbar.harder, 2) - toolbar.harder.show() - - toolbar.easier = ToolButton('activity-easier') - toolbar.easier.set_tooltip(_('Easier')) - toolbar.easier.connect('clicked', self._easier_cb) - toolbar.insert(toolbar.easier, 2) - toolbar.easier.show() - - return toolbar - - def _harder_cb(self, button): - pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT, action='harder')) - - def _easier_cb(self, button): - pygame.event.post(olpcgames.eventwrap.Event(pygame.USEREVENT, action='easier')) diff --git a/Maze.activity/activity/activity.info b/Maze.activity/activity/activity.info index 7c4af02..96c105c 100644 --- a/Maze.activity/activity/activity.info +++ b/Maze.activity/activity/activity.info @@ -1,7 +1,9 @@ [Activity] name = Maze -service_name = vu.lux.olpc.Maze +bundle_id = vu.lux.olpc.Maze class = activity.MazeActivity icon = activity-maze activity_version = 6 show_launcher = yes +license = GPLv3+ +host_version = 1
\ No newline at end of file diff --git a/Maze.activity/game.py b/Maze.activity/game.py index 2ce497c..3d194fc 100644 --- a/Maze.activity/game.py +++ b/Maze.activity/game.py @@ -226,13 +226,6 @@ class MazeGame: print "Error handling message: %s\n%s" % (event, sys.exc_info()) else: print "Message from unknown buddy?" - elif event.type == pygame.USEREVENT: - if event.action == 'harder': - self.harder() - elif event.action == 'easier': - self.easier() - else: - print "Unknown user event action:", event.action else: print "Unknown event:", event diff --git a/Maze.activity/icons/activity-easier.svg b/Maze.activity/icons/activity-easier.svg deleted file mode 100644 index 5b1caef..0000000 --- a/Maze.activity/icons/activity-easier.svg +++ /dev/null @@ -1,15 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY fill_color "#FFFFFF">
- <!ENTITY stroke_color "#000000">
-]>
-<svg version="1.1" id="Layer_5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- width="74.5px" height="74px" viewBox="0 0 74.5 74" enable-background="new 0 0 74.5 74" xml:space="preserve">
-<g>
- <circle cx="37.026" cy="37.18" r="30" fill="&fill_color;"/>
- <g>
- <line fill="none" stroke="&stroke_color;" stroke-width="4" x1="55.026" y1="37.18" x2="19.026" y2="37.18"/>
- </g>
-</g>
-</svg>
diff --git a/Maze.activity/icons/activity-harder.svg b/Maze.activity/icons/activity-harder.svg deleted file mode 100644 index e1fc560..0000000 --- a/Maze.activity/icons/activity-harder.svg +++ /dev/null @@ -1,16 +0,0 @@ -<?xml version="1.0" encoding="utf-8"?>
-<!-- Generator: Adobe Illustrator 13.0.0, SVG Export Plug-In . SVG Version: 6.00 Build 14948) -->
-<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd" [
- <!ENTITY fill_color "#FFFFFF">
- <!ENTITY stroke_color "#000000">
-]>
-<svg version="1.1" id="Layer_5" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
- width="74.5px" height="74px" viewBox="0 0 74.5 74" enable-background="new 0 0 74.5 74" xml:space="preserve">
-<g>
- <circle cx="37.026" cy="37.18" r="30" fill="&fill_color;"/>
- <g>
- <line fill="none" stroke="&stroke_color;" stroke-width="4" x1="37.026" y1="19.18" x2="37.026" y2="55.18"/>
- <line fill="none" stroke="&stroke_color;" stroke-width="4" x1="55.026" y1="37.18" x2="19.026" y2="37.18"/>
- </g>
-</g>
-</svg>
|