| Home | Trees | Index | Help |
|---|
|
|
object --+
|
LevelEditorTool --+
|
EntityTool
AgentTool,
AvatarTool,
DecorationTool,
EditorLabelTool,
PlatformTool,
SpaceTool,
WallToolentity_factories -- a list of entity
constructors.
relevant(entity) -- returns true if
this tool can be used to manipulate a given entity.
shortcut -- The keyboard shortcut for
this tool.
getinfo(entity) -- Returns a string
describing the given entity, to be displayed in the infobox.
| Method Summary | |
|---|---|
__init__(self,
level,
display,
subtool_icons)
| |
Turn this tool on. | |
Add the given entity to the level, and mark it as applicable. | |
Turn this tool off. | |
delete_entity(self,
entity)
| |
getinfo(self,
entity)
| |
menu_Delete(self,
entity)
| |
menu_Lower(self,
entity)
| |
menu_Raise(self,
entity)
| |
Return true if this tool should manipulate the given entity. | |
select(self,
entity)
| |
Select the subtool corresponding to the given icon | |
update_infobox(self)
| |
| Mouse Event Handerls | |
Called when the user clicks the left mouse button on an entity; by default, this method selects the entity. | |
Called when the user clicks the left mouse button on an empty area; by default, this creates a new entity. | |
Called when the user starts dragging an entity with the left mouse button; by default, this does nothing. | |
Called when the user drags an entity with the left mouse button; by default, this moves the entity. | |
Called when the user finishes dragging an entity with the left mouse button; by default, this does nothing. | |
Called when the user starts dragging in empty space with the left mouse button; by default, this creates a new entity and selects it. | |
Called when the user drags in empty space with the left moues button; by default this moves the newly created entity. | |
Called when the user finishes dragging in empty space with the left mouse button; by default, this does nothing. | |
| Inherited from LevelEditorTool | |
| |
| Inherited from object | |
x.__delattr__('name') <==> del x.name | |
x.__getattribute__('name') <==> x.name | |
Return hash(x)... | |
Return a new object with type S, a subtype of T... | |
helper for pickle | |
helper for pickle | |
Return repr(x)... | |
x.__setattr__('name', value) <==> x.name = value | |
Return str(x)... | |
| Instance Variable Summary | |
|---|---|
selection: The currently selected entity, or None if no entity is
selected | |
| Inherited from LevelEditorTool | |
NoneType |
shortcut: The keyboard shortcut for this tool, or None if this tool
doesn't have a keyboard shortcut. |
| Class Variable Summary | |
|---|---|
NoneType |
entity_factories: A list of entity constructors or factory functions, which take (x,y)
as input and return a new entity. |
entity_factory: The currently selected entity factory function. | |
bool |
hide_body_markers = True
|
| Method Details |
|---|
click_entity(self, entity, x, y)Called when the user clicks the left mouse button on an entity; by default, this method selects the entity. |
click_space(self, x, y)Called when the user clicks the left mouse button on an empty area; by default, this creates a new entity. |
start_drag_entity(self, entity, x, y)Called when the user starts dragging an entity with the left mouse button; by default, this does nothing. |
drag_entity(self, entity, oldx, oldy, newx, newy)Called when the user drags an entity with the left mouse button; by default, this moves the entity. |
stop_drag_entity(self, entity, x, y)Called when the user finishes dragging an entity with the left mouse button; by default, this does nothing. |
start_drag_space(self, x, y)Called when the user starts dragging in empty space with the left mouse button; by default, this creates a new entity and selects it. |
drag_space(self, oldx, oldy, newx, newy)Called when the user drags in empty space with the left moues button; by default this moves the newly created entity. |
stop_drag_space(self, x, y)Called when the user finishes dragging in empty space with the left mouse button; by default, this does nothing. |
__init__(self,
level,
display,
subtool_icons)
|
activate(self)Turn this tool on.
|
add_entity(self, entity, select=True)Add the given entity to the level, and mark it as applicable. Ifselect is true, then select the new entity.
|
deactivate(self)Turn this tool off.
|
delete_entity(self, entity) |
getinfo(self, entity) |
menu_Delete(self, entity) |
menu_Lower(self, entity) |
menu_Raise(self, entity) |
relevant(self, entity)Return true if this tool should manipulate the given entity. |
select(self, entity) |
select_subtool(self, subtool)Select the subtool corresponding to the given icon
|
update_infobox(self) |
| Instance Variable Details |
|---|
selectionThe currently selected entity, orNone if no entity is
selected
|
| Class Variable Details |
|---|
entity_factoriesA list of entity constructors or factory functions, which take (x,y) as input and return a new entity.
|
entity_factoryThe currently selected entity factory function. |
hide_body_markers
|
| Home | Trees | Index | Help |
|---|
| Generated by Epydoc 2.1 on Thu Sep 22 22:52:41 2005 | http://epydoc.sf.net |