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

Class GameView

Known Subclasses:
TrackerGameView

Handles drawing of all game components, and can be added to other Tkinter components.
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.
  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.

areaSelected(self, area)

Called by area view components when selected, passes info onto client.

canvasAdjusted(self, args=None)

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.

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