Package scripts :: Script controllerbase :: Class ControllerBase
[hide private]
[frames] | no frames]

Class ControllerBase

source code

                                       object --+    
                                                |    
        common.listeners.key_listener.KeyListener --+
                                                    |
                                       object --+   |
                                                |   |
    common.listeners.mouse_listener.MouseListener --+
                                                    |
                                       object --+   |
                                                |   |
common.listeners.command_listener.CommandListener --+
                                                    |
                                                   ControllerBase

Base of Controllers

Instance Methods [hide private]
 
__init__(self, engine, view, model, application)
Constructor
source code
 
pause(self, paused)
Stops receiving events
source code
 
setMouseCursor(self, image, dummy_image, mc_type="native")
Set the mouse cursor to an image.
source code
 
resetMouseCursor(self)
Reset cursor to default image.
source code
 
onStop(self)
Called when the controller is removed from the list
source code
 
pump(self)
This method gets called every frame
source code

Inherited from common.listeners.key_listener.KeyListener: attach, detach, keyPressed, keyReleased

Inherited from common.listeners.mouse_listener.MouseListener: mouseClicked, mouseDragged, mouseEntered, mouseExited, mouseMoved, mousePressed, mouseReleased, mouseWheelMovedDown, mouseWheelMovedUp

Inherited from common.listeners.command_listener.CommandListener: onCommand

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties [hide private]

Inherited from object: __class__

Method Details [hide private]

__init__(self, engine, view, model, application)
(Constructor)

source code 

Constructor

Parameters:
  • engine (fife.Engine) - Instance of the active fife engine
  • view - Instance of a GameSceneView
  • type - scripts.GameSceneView
  • model (scripts.GameModel) - The model that has the current gamestate
  • application (scripts.PARPGApplication) - The application that created this controller
  • settings (fife.extensions.fife_settings.Setting) - The current settings of the application
Overrides: object.__init__

setMouseCursor(self, image, dummy_image, mc_type="native")

source code 

Set the mouse cursor to an image.

Parameters:
  • image (string) - The image you want to set the cursor to
  • dummy_image (string) - ???
  • type (string) - ???
Returns:
None

resetMouseCursor(self)

source code 

Reset cursor to default image.

Returns:
None