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

Type WallTool

     object --+        
              |        
LevelEditorTool --+    
                  |    
         EntityTool --+
                      |
                     WallTool


Method Summary
  __init__(self, level, display)
  drag_entity(self, wall, oldx, oldy, newx, newy)
Move (if they drag by the middle) or resize (if by edges)
  drag_space(self, oldx, oldy, newx, newy)
Resize the newly created wall
  relevant(self, entity)
Return true if this tool should manipulate the given entity.
  resize(self, wall, x, y)
  start_drag_entity(self, wall, x, y)
  start_drag_space(self, x, y)
Create a new wall
    Inherited from EntityTool
  activate(self)
Turn this tool on.
  add_entity(self, entity, select)
Add the given entity to the level, and mark it as applicable.
  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.
  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)
  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
NoneType shortcut: The keyboard shortcut for this tool, or None if this tool doesn't have a keyboard shortcut.
    Inherited from EntityTool
  selection: The currently selected entity, or None if no entity is selected

Class Variable Summary
str cat = 'TwigWall'
str dragmode = 'move'
NoneType entity_factories: A list of entity constructors or factory functions, which take (x,y) as input and return a new entity.
    Inherited from EntityTool
  entity_factory: The currently selected entity factory function.
bool hide_body_markers = True

Method Details

__init__(self, level, display)
(Constructor)

Overrides:
pajammin.util.leveleditor.EntityTool.__init__

drag_entity(self, wall, oldx, oldy, newx, newy)

Move (if they drag by the middle) or resize (if by edges)
Overrides:
pajammin.util.leveleditor.EntityTool.drag_entity

drag_space(self, oldx, oldy, newx, newy)

Resize the newly created wall
Overrides:
pajammin.util.leveleditor.EntityTool.drag_space

relevant(self, entity)

Return true if this tool should manipulate the given entity.
Overrides:
pajammin.util.leveleditor.EntityTool.relevant (inherited documentation)

resize(self, wall, x, y)

start_drag_entity(self, wall, x, y)

Overrides:
pajammin.util.leveleditor.EntityTool.start_drag_entity

start_drag_space(self, x, y)

Create a new wall
Overrides:
pajammin.util.leveleditor.EntityTool.start_drag_space

Instance Variable Details

shortcut

The keyboard shortcut for this tool, or None if this tool doesn't have a keyboard shortcut.
Type:
NoneType
Value:
'w'                                                                    

Class Variable Details

cat

Type:
str
Value:
'TwigWall'                                                             

dragmode

Type:
str
Value:
'move'                                                                 

entity_factories

A list of entity constructors or factory functions, which take (x,y) as input and return a new entity.
Type:
NoneType
Value:
[<function <lambda> at 0x101f530>,
 <function <lambda> at 0x101f570>,
 <function <lambda> at 0x101f5b0>,
 <function <lambda> at 0x101f5f0>,
 <function <lambda> at 0x101f630>,
 <function <lambda> at 0x101f670>,
 <function <lambda> at 0x101f6b0>,
 <function <lambda> at 0x101f6f0>,
...