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

Class TrackerGameView

GameView --+
           |
          TrackerGameView


Extended version of GameView providing additional methods for Tracker client.
Method Summary
  __init__(self, parent, context)
  agentSelected(self, agent)
Called by agent view components when selected, passes info onto client.
  areaSelected(self, area)
Called by area view components when selected, passes info onto client.
  makeSelection(self, identifier, selectedItem)
Called by component sprites when selected.
  selectItem(self, selectedItem)
Selects specified item if present within view.
    Inherited from GameView
  canvasAdjusted(self, args)
Responds to main window being adjusted in size.
  clearCanvas(self)
Clears entire game world from canvas.
  clearSelection(self)
Clears any selected items in view.
  displayPosition(self, viewX, viewY)
Displays gameworld coordinates for specified view location.
  drawAgentsFresh(self)
Draws new view graphics for agents.
  drawTerrainFresh(self)
Clears canvas and draws the game world, scaled to canvas area.
  getScriptForAgent(self, agent)
Gets script for selected agent.
  onSingleClick(self, event)
Responds to single-click from mouse.
  selectAgentWithIdNum(self, idNum)
Selects agent with matching id number.
  selectAreaWithIdNum(self, idNum)
Selects area with matching id number.
  setupAgents(self, agentData)
Creates agent sprites.
  setupTerrainAreas(self, areasX, areasY, areaData)
Maps gamewolrd dimensions to canvas, creates terrainAreaViews.
  setWorldDimensions(self, worldDimX, worldDimY)
Sets dimensions of game world.
  updateAgents(self, agentData)
Updates agentViews with specified data.
  updateTerrainAreas(self, areaData)
Updates terrainAreaViews with specified data.
  worldLocationToScreen(self, locX, locY)
Converts location in world coordinates to screen coordinates.

Method Details

agentSelected(self, agent)

Called by agent view components when selected, passes info onto client.
Overrides:
svs_demogame.gameviews.GameView.agentSelected

areaSelected(self, area)

Called by area view components when selected, passes info onto client.
Overrides:
svs_demogame.gameviews.GameView.areaSelected

makeSelection(self, identifier, selectedItem)

Called by component sprites when selected.

Sends message to parent for synchronisation.

NOTE: this version of the method is slightly different from that of others, as normally an identifier is dervied from the selectedItem object itself. This should really be fixed in later versions.

selectItem(self, selectedItem)

Selects specified item if present within view.

This method is used to synchronise selesctions between the different tracker views.

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