Package horizons :: Package gui :: Package mousetools :: Module tilelayingtool :: Class TileLayingTool
[hide private]
[frames] | no frames]

Class TileLayingTool

source code

fife.fife.IMouseListener --+        
                           |        
       cursortool.CursorTool --+    
                               |    
   navigationtool.NavigationTool --+
                                   |
                                  TileLayingTool

Tool to lay ground tiles.

Instance Methods [hide private]
 
__init__(self, session, tile_details) source code
 
_set_cursor_image(self)
Replace the cursor with an image of the selected tile.
source code
 
remove(self) source code
 
on_escape(self) source code
 
mouseMoved(self, evt) source code
 
_place_tile(self, coords) source code
 
get_world_location(self, evt) source code
 
mousePressed(self, evt) source code
 
mouseDragged(self, evt)
Allow placing tiles continusly while moving the mouse.
source code
 
update_coloring(self, evt) source code
 
_add_coloring(self, pos) source code
 
_remove_coloring(self) source code
    Inherited from navigationtool.NavigationTool
 
_schedule_hover_instance_update(self)
Hover instances have potentially changed, do an update in a timely fashion (but not right away)
source code
 
_send_hover_instance_upate(self)
Broadcast update with new instances below mouse (hovered).
source code
 
end(self) source code
 
get_hover_instances(self, where, layers=None)
Utility method, returns the instances under the cursor
source code
 
mouseReleased(self, evt) source code
 
mouseWheelMovedDown(self, evt) source code
 
mouseWheelMovedUp(self, evt) source code
 
onCommand(self, command)
Called when some kind of command-event happens.
source code
    Inherited from cursortool.CursorTool
 
_get_screenpoint(self, arg)
Python lacks polymorphism.
source code
 
_round_map_coords(self, map_x, map_y)
Returns the coordinates of an event at the map.
source code
 
disable(self)
Call this to not get events.
source code
 
enable(self)
Call this to get events.
source code
 
get_exact_world_location(self, evt)
Returns the coordinates of an event at the map.
source code
 
mouseClicked(self, evt) source code
 
mouseEntered(self, evt) source code
 
mouseExited(self, evt) source code
Class Variables [hide private]
  HIGHLIGHT_COLOR = 0, 200, 90
  tile_images = {}
    Inherited from navigationtool.NavigationTool
  HOVER_INSTANCES_UPDATE_DELAY = 1
  last_event_pos = fife.ScreenPoint(0, 0)
  last_hover_instances = WeakList()
  send_hover_instances_update = True
    Inherited from cursortool.CursorTool
  log = logging.getLogger("gui.mousetools")
Method Details [hide private]

__init__(self, session, tile_details)
(Constructor)

source code 
Overrides: cursortool.CursorTool.__init__

remove(self)

source code 
Overrides: cursortool.CursorTool.remove

mouseMoved(self, evt)

source code 
Overrides: cursortool.CursorTool.mouseMoved

get_world_location(self, evt)

source code 
Overrides: cursortool.CursorTool.get_world_location

mousePressed(self, evt)

source code 
Overrides: cursortool.CursorTool.mousePressed

mouseDragged(self, evt)

source code 

Allow placing tiles continusly while moving the mouse.

Overrides: cursortool.CursorTool.mouseDragged