wxMapTextCtrl

Displays information about the currently selected map in a text control.  This includes all of the relevant map information, such as map name, points, min/max players, map creator, etc.  The wxMapTextCtrl also includes information about any variants that are in effect, and shows whether the map is Standard, Seafarers, Cities & Knights, or any combination thereof.

Derived From

wxBaseTextCtrl

Project

Cities3D

Include

MapTextCtrl.h

Summary
Displays information about the currently selected map in a text control.
The wxMapTextCtrl constructor.
The wxMapTextCtrl destructor.
Sets the C&K flag.
Updates the text in the control.
The C&K flag.

Public

Summary
The wxMapTextCtrl constructor.
The wxMapTextCtrl destructor.
Sets the C&K flag.

Constructors

wxPlayerTreeCtrl

The wxMapTextCtrl constructor.  Adds OnUpdateText as a receiver of the eventPreGame Event.  Immediately calls the MapDatabase to retrieve the current map selection text.

Parameters

parentThe parent window.
idThe message handling ID.  Should be a unique (to the parent window) ID, if the parent window wants to receive messages from the control.
posThe text control position in window coordinates.
sizeThe text control size.

Destructor

~wxMapTextCtrl

~wxMapTextCtrl()

The wxMapTextCtrl destructor.  Removes OnUpdateText as a receiver of the eventPreGame Event.

Functions

SetCK

void SetCK(bool val)

Sets the C&K flag.  If the user is playing with Cities & Knights rules, this information must be passed into the MapDatabase when it is creating the information text for the currently selected map.

Parameters

valThe C&K flag.  True if Cities & Knights is being played, false if not.

Private

Summary
Updates the text in the control.
The C&K flag.

Game Event Functions

OnUpdateText

void OnUpdateText(GamePtr game)

Updates the text in the control.  Calls the MapDatabase to retrieve the most up-to-date text.  Triggered by the eventPreGame Event.

Parameters

gameThe current Game.

Variables

mCK

bool mCK

The C&K flag.  True if Cities & Knights is being played, false if not.

~wxMapTextCtrl()
The wxMapTextCtrl destructor.
void SetCK(bool val)
Sets the C&K flag.
void OnUpdateText(GamePtr game)
Updates the text in the control.
bool mCK
The C&K flag.
A basic text control.
Cities3D is a cross-platform implementation of the board game Settlers of Catan with all expansions, including Seafarers, and Cities & Knights.
A generic implementation of the Observer design pattern.
Still volatile.
Still volatile.