MapDisplay

The MapDisplay is an single view of a game’s MapData.

Summary
MapDisplayThe MapDisplay is an single view of a game’s MapData.
Implementation DetailsThe MapDisplay is a very general UI element that is not specific to any particular game.
XML DefinitionThis is the MapDisplay xml definition.
Optional AttributesThese attributes are optional, depending on the MapDisplay that you are trying to create.
shapeThe shape of the map.
iconScaleThe amount to scale the icons.
loadingAnimA reference to an AnimatedImage to display while the map is loading data.
Window CallbacksThese are the SliderBar specific callback events.
Callbacks
OnPointMouseOverCalled when the user mouses over a icon map point (or points).

Implementation Details

The MapDisplay is a very general UI element that is not specific to any particular game.  It is only the visual front end for a game’s map system.

Under the hood, the Map display creates a ‘map’ background image, and supports the display various icons.  When the game adds icon, or other data to a MapDisplay, the MapDisplay provides the game a unique display index for each map point.  When you mouse over or click on a map icon, you must pass that id number into your game-specific callback to get your game relevant data.

WARNING

The MapDisplay uses a stencil buffer, so it will not work correctly if placed as a child element of any other stencil-using window element.  These include..

XML Definition

This is the MapDisplay xml definition.

Summary
Optional AttributesThese attributes are optional, depending on the MapDisplay that you are trying to create.
shapeThe shape of the map.
iconScaleThe amount to scale the icons.
loadingAnimA reference to an AnimatedImage to display while the map is loading data.

Optional Attributes

These attributes are optional, depending on the MapDisplay that you are trying to create.

shape

The shape of the map.

Expects

A string value, that is one of the following...

”rect”A rectangular map.
”circular”A circular map.

Default Value

  • 1.0

iconScale

The amount to scale the icons.

Expects

A number value, (1.0 = 100% )

Default Value

  • 1.0

loadingAnim

A reference to an AnimatedImage to display while the map is loading data.  This image will be shown/hidden by the game when map data is being loaded for this display.

Expects

A string value, which is a valid AnimatedImage definition.

Default Value

  • ””

Window Callbacks

These are the SliderBar specific callback events.

Summary
Callbacks
OnPointMouseOverCalled when the user mouses over a icon map point (or points).

Callbacks

OnPointMouseOver

Called when the user mouses over a icon map point (or points).

Syntax

SomeMapWindow.OnPointMouseOver()

Notes

See the <WindowName.MouseoverPoints> variable for all of the points currently under the mouse cursor.

The AnimatedImage automates flip-book style animations.
The PageWindow provides an automated display for creating a book-like layout.
The ScrollWindow is a container window that provides a vertical scrolling panel for all of it’s child windows.
The HorizontalScrollWindow is a container window that provides a horizontal scrolling panel for all of it’s child windows.