Package pajammin :: Package util :: Module leveleditor :: Class SpaceTool
[show private | hide private]
[frames | no frames]

Type SpaceTool

     object --+        
              |        
LevelEditorTool --+    
                  |    
         EntityTool --+
                      |
                     SpaceTool

Known Subclasses:
LevelExitTool, SolidSpaceTool

Method Summary
  __init__(self, level, display, icons)
  activate(self)
Turn this tool on.
  add_entity(self, entity)
  deactivate(self)
Turn this tool off.
  delete_entity(self, entity)
  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.
  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.
  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.
  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.
    Inherited from EntityTool
  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.
  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
  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.
  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.
  update_infobox(self)
    Inherited from LevelEditorTool
  set_level(self, level)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
Return hash(x)...
  __new__(T, S, ...)
Return a new object with type S, a subtype of T...
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
Return repr(x)...
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
Return str(x)...

Instance Variable Summary
    Inherited from EntityTool
  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 action = None                                                                  
type Marker = pajammin.util.leveleditor.Marker
    Inherited from EntityTool
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

__init__(self, level, display, icons)
(Constructor)

Overrides:
pajammin.util.leveleditor.EntityTool.__init__

activate(self)

Turn this tool on.
Overrides:
pajammin.util.leveleditor.EntityTool.activate (inherited documentation)

add_entity(self, entity)

Overrides:
pajammin.util.leveleditor.EntityTool.add_entity

deactivate(self)

Turn this tool off.
Overrides:
pajammin.util.leveleditor.EntityTool.deactivate (inherited documentation)

delete_entity(self, entity)

Overrides:
pajammin.util.leveleditor.EntityTool.delete_entity

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.
Overrides:
pajammin.util.leveleditor.EntityTool.drag_entity (inherited documentation)

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.
Overrides:
pajammin.util.leveleditor.EntityTool.drag_space (inherited documentation)

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.
Overrides:
pajammin.util.leveleditor.EntityTool.start_drag_entity (inherited documentation)

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.
Overrides:
pajammin.util.leveleditor.EntityTool.start_drag_space (inherited documentation)

Class Variable Details

action

Type:
NoneType
Value:
None