Package horizons :: Package gui :: Package modules :: Module ingame :: Class CityInfo
[hide private]
[frames] | no frames]

Class CityInfo

source code

Display city name and inhabitant count at top of the screen.

Instance Methods [hide private]
 
__init__(self, ingame_gui) source code
 
end(self) source code
 
_on_hover_settlement_change(self, message) source code
 
set_settlement(self, settlement)
Sets the city name at top center of screen.
source code
 
_on_settler_inhabitant_change(self, message)
Update display of inhabitants count.
source code
 
_update_settlement(self) source code
 
_update_position(self)
Places cityinfo widget depending on resource bar dimensions.
source code
 
_on_resourcebar_resize(self, message) source code
 
hide(self) source code
Method Details [hide private]

set_settlement(self, settlement)

source code 

Sets the city name at top center of screen.

Show/Hide is handled automatically

_update_position(self)

source code 

Places cityinfo widget depending on resource bar dimensions.

For a normal-sized resource bar and reasonably large resolution: * determine resource bar length (includes gold) * determine empty horizontal space between resbar end and minimap start * display cityinfo centered in that area if it is sufficiently large

If too close to the minimap (cityinfo larger than length of this empty space) move cityinfo centered to very upper screen edge. Looks bad, works usually. In this case, the resbar is redrawn to put the cityinfo "behind" it visually.