Mercurial > mamba
annotate mamba/habitats/editor.py @ 42:8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
author | Simon Cross <hodgestar@gmail.com> |
---|---|
date | Sun, 11 Sep 2011 15:16:37 +0200 |
parents | |
children | d09f63429b80 |
rev | line source |
---|---|
42
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
1 """Habitat for editing levels.""" |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
2 |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
3 from mamba.engine import Habitat |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
4 from mamba.widgets.level import LevelWidget |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
5 from mamba.level import Level |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
6 |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
7 |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
8 class EditorHabitat(Habitat): |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
9 def __init__(self, level_name): |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
10 super(EditorHabitat, self).__init__() |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
11 self.level = Level(level_name) |
8521c142cd43
Add habitat for editor and reshuffle when options are checked to before initializing the display window.
Simon Cross <hodgestar@gmail.com>
parents:
diff
changeset
|
12 self.container.add(LevelWidget(self.level)) |