Package horizons :: Package world :: Package managers :: Module productionfinishediconmanager :: Class ProductionFinishedIconManager
[hide private]
[frames] | no frames]

Class ProductionFinishedIconManager

source code

Manager class that manages all production finished icons. It listens to ResourceProduced messages on the main message bus

Instance Methods [hide private]
 
__init__(self, renderer, layer) source code
 
enable(self) source code
 
disable(self) source code
 
end(self) source code
 
_on_setting_changed(self, message) source code
 
_on_resource_produced(self, message)
This is called by the message bus with ResourceProduced messages
source code
 
__render_icon(self, instance, group, res, amount)
This renders the icon.
source code
 
remove_icon(self, group)
Remove the icon after the animation finished Also removes the entry in the run-dictionary.
source code
 
get_resource_string(self, instance, res)
Returns the render name for resource icons of this instance This key MUST be unique!
source code
Method Details [hide private]

__init__(self, renderer, layer)
(Constructor)

source code 
Parameters:
  • renderer - Renderer used to render the icons
  • layer - map layer, needed to place icon

__render_icon(self, instance, group, res, amount)

source code 

This renders the icon. It calculates the position of the icon. Most parts of this were copied from horizons/world/managers/statusiconmanager.py