Package svs_demogame :: Module gameviews :: Class TerrainAreaView
[show private | hide private]
[frames | no frames]

Class TerrainAreaView

GenericComponentView --+
                       |
                      TerrainAreaView


Draws terrain area.
Method Summary
  __init__(self, context, idNum, density, gameData)
  drawFresh(self, xMin, yMin, xMax, yMax)
Creates component on display context.
  onDoubleClick(self, event)
Responds to double-click from mouse.
  onSingleClick(self, event)
Responds to single-click from mouse.
  setDensity(self, density, updateView)
Changes colour of area to represent density.
  updateWithData(self, data)
Handles info from svs_demogame.terrain.TerrainAreaState object.
    Inherited from GenericComponentView
  containsPoint(self, x, y)
If point is within bounds of component, returns True, otherwise False.
  deselect(self)
Deselects sprite.
  select(self)
Selects sprite.

Method Details

drawFresh(self, xMin, yMin, xMax, yMax)

Creates component on display context.

onDoubleClick(self, event)

Responds to double-click from mouse.

onSingleClick(self, event)

Responds to single-click from mouse.

setDensity(self, density, updateView=True)

Changes colour of area to represent density.

Black = density of 1.0, white = density of 0.0

updateWithData(self, data)

Handles info from svs_demogame.terrain.TerrainAreaState object.

Generated by Epydoc 2.1 on Thu Oct 20 15:30:30 2005 http://epydoc.sf.net