WorldMapPanelUI ​
The world map window: the picture of the world with its zones laid over it. Move the mouse over the map and the zone under it lights up with its name; click it and the map zooms into that zone (darkening the world around it) with its own sub-zones to hover and click in turn; Back goes up one zone, and the list on the left opens any zone of the world. A marker shows where the party is. The map picture is the one of the world (WorldData.map_image, made in the editor with Generate Map Preview, covering WorldData.map_rect); the zones are worked out from the world (ZoneMap): painted on the terrain, zone volumes and the default zone. It opens like any panel: its panel name is world_map. See docs: World > World map.
Properties ​
float | zoom_seconds | 0.35 |
float | zoom_margin | 1.35 |
float | minimum_view | 0.06 |
Variables ​
ZoneMap | zone_map | null |
int | open_zone_id | 0 |
Methods ​
void | initialize_ui( p_system_hub: GameHost.SystemHub ) |
void | refresh() |
void | show_world( world: WorldData, rect: Rect2, terrain: Object, volumes: Array ) |
void | open_zone( zone_id: int ) |
void | back() |
Property descriptions ​
float zoom_seconds = 0.35 ​
The seconds the map takes to zoom into a zone and back out
float zoom_margin = 1.35 ​
How much room is left round a zone when the map zooms into it (1.35 = a third more than the zone's box)
float minimum_view = 0.06 ​
The smallest part of the map a zoom shows (0.05 = a twentieth of its width): a house is not zoomed into until it is a blur
Variable descriptions ​
ZoneMap zone_map = null ​
The zones laid over the map
int open_zone_id = 0 ​
The zone that is open (0 = the whole world)
Method descriptions ​
void initialize_ui( p_system_hub: GameHost.SystemHub ) ​
Sets the window up with the hub of the game systems.
void refresh() ​
Makes the map from the world that is loaded
void show_world( world: WorldData, rect: Rect2, terrain: Object, volumes: Array ) ​
Shows the map of a world: its picture, the area it covers, and where its zones are (the terrain painted with them and its zone volumes)
void open_zone( zone_id: int ) ​
Opens the map of a zone: the map zooms into it and the world around it goes dark. 0 goes back to the whole world
void back() ​
Goes up one zone (to the zone it is a part of, or to the whole world)