Package svs_demogame :: Module gui :: Class CodePlayerGUI
[show private | hide private]
[frames | no frames]

Class CodePlayerGUI

ClientGUI --+
            |
           CodePlayerGUI


Interface for player with script editor.
Method Summary
  __init__(self, client)
  agentSelected(self, agentIdNum)
Called by agent view compoents when selected, passes info onto client.
  areaSelected(self, areaIdNum)
Called by area view compoents when selected, passes info onto client.
  build(self)
Creates interface components.
  clearScriptArea(self)
Clear script editing area.
  destroy(self, args)
Closes and destroys interface components.
  displayPosition(self, viewX, viewY)
Displays gameworld coordinates for specified view location.
  displayRevisionLog(self, logData)
Displays revision log.
  getScriptAreaText(self)
Retrieves text contents from script editing area.
  getScriptForAgent(self, agentIdNum)
Passes on request to client for script for agant.
  getSelectedAgentId(self)
Returns id for agent selected in self.gameView.
  getSelectedAreaId(self)
Returns id for terrain area selected in self.gameView.
  onCopyConsole(self, event)
Copies selected text from console.
  onCopyScriptArea(self, event)
Copies selected text from script area.
  onCutConsole(self, event)
Cuts and copies selected text from console.
  onCutScriptArea(self, event)
Cuts and copies selected text from script area.
  onEnterScript(self)
Responds to 'Enter' button being clicked, send script to gameworld.
  onPasteConsole(self, event)
Pastes copied text into console.
  onPasteScriptArea(self, event)
Pastes copied text into script area.
  onQuitClient(self)
Quits game client.
  onResetScript(self)
Responds to 'Reset' button being clicked, clears script editor.
  onScriptHistory(self)
Responds to 'History' button being clicked, get revision log for script.
  revisionSelected(self, event, revNumber)
Called when a script revision is selected from the revision log.
  setScriptAreaText(self, text, filepath)
Clear script editing area and display new text.
  setupGameWorld(self, gameModel)
Creates gameworld views from specified model.
  showDefaultCursor(self, event)
  showHandCursor(self, event)
  update(self, timestamp)
Updates view components.
  updateGameWorld(self, updateData)
Updates gameworld views from specified data.
    Inherited from ClientGUI
  buildStandardComponents(self)
Creates interface components.
  clearLogDisplay(self)
Clear console.
  close(self, args)
Closes interface window.
  destroyView(self, args)
Destroys visualisation view.
  enterCommand(self)
Handles text from input field as command.
  errorMessage(self, text)
Displays error message in console.
  getConsoleText(self)
Retrieves text contents from console.
  hideView(self)
Hides visualisation view.
  openView(self, fullscreen)
Open visualisation view.
  setConsoleText(self, text, file)
Clear console and display new text.
  setEchoInput(self, state)
If 'True' echoes input in console, if "False' then no echo.
  statusMessage(self, text)
Displays status message in console.
  stepBackCommand(self)
Step back one place in the buffer of input commands.
  stepForwardCommand(self)
Step forward one place in the buffer of input commands.

Method Details

agentSelected(self, agentIdNum)

Called by agent view compoents when selected, passes info onto client.

areaSelected(self, areaIdNum)

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

build(self)

Creates interface components.
Overrides:
svs_core.gui.clientgui.ClientGUI.build

clearScriptArea(self)

Clear script editing area.

destroy(self, args=None)

Closes and destroys interface components.
Overrides:
svs_core.gui.clientgui.ClientGUI.destroy

displayPosition(self, viewX, viewY)

Displays gameworld coordinates for specified view location.

displayRevisionLog(self, logData)

Displays revision log.

getScriptAreaText(self)

Retrieves text contents from script editing area.

getScriptForAgent(self, agentIdNum)

Passes on request to client for script for agant.

getSelectedAgentId(self)

Returns id for agent selected in self.gameView.

getSelectedAreaId(self)

Returns id for terrain area selected in self.gameView.

onCopyConsole(self, event)

Copies selected text from console.

onCopyScriptArea(self, event)

Copies selected text from script area.

onCutConsole(self, event)

Cuts and copies selected text from console.

onCutScriptArea(self, event)

Cuts and copies selected text from script area.

onEnterScript(self)

Responds to 'Enter' button being clicked, send script to gameworld.

onPasteConsole(self, event)

Pastes copied text into console.

onPasteScriptArea(self, event)

Pastes copied text into script area.

onQuitClient(self)

Quits game client.

onResetScript(self)

Responds to 'Reset' button being clicked, clears script editor.

onScriptHistory(self)

Responds to 'History' button being clicked, get revision log for script.

revisionSelected(self, event, revNumber)

Called when a script revision is selected from the revision log.

setScriptAreaText(self, text='', filepath=None)

Clear script editing area and display new text.

setupGameWorld(self, gameModel)

Creates gameworld views from specified model.

The model is received as a dictionary in the following form:
  • areas_x: number of areas on x axis
  • areas_y: number of areas on y axis
  • area_data: array of information about specific areas

update(self, timestamp)

Updates view components.
Overrides:
svs_core.gui.clientgui.ClientGUI.update

To Do: does nothing at present.

updateGameWorld(self, updateData)

Updates gameworld views from specified data.

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