Skip to content

WorldMapPanelUI ​

Inherits: PanelUI < Control

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 ​

floatzoom_seconds0.35
floatzoom_margin1.35
floatminimum_view0.06

Variables ​

ZoneMapzone_mapnull
intopen_zone_id0

Methods ​

voidinitialize_ui( p_system_hub: GameHost.SystemHub )
voidrefresh()
voidshow_world( world: WorldData, rect: Rect2, terrain: Object, volumes: Array )
voidopen_zone( zone_id: int )
voidback()

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)