ColorInfo

A namespace that provides information about each of the colors available to players in the game.

Project

DatabaseCore

Include

ColorInfo.h

Summary
A namespace that provides information about each of the colors available to players in the game.
Provides a string representation of the name of a color.
Provides a wxColour for displaying OpenGL objects with a color.
Provides a wxColour for displaying text with a color.
Creates a rectangular image of a color.

Functions

Name

const wxString DATABASE_EXPORT_SPEC &Name(const ColorType type)

Provides a string representation of the name of a color.

Parameters

typeThe color in question.

Returns

A wxString containing the name of the color.

GLColor

wxColour DATABASE_EXPORT_SPEC GLColor(const ColorType type)

Provides a wxColour for displaying OpenGL objects with a color.  The GL color of a given ColorType is used in for appropriately painting all OpenGL objects of the player who is using that color.

Parameters

typeThe color in question.

Returns

A wxColour containing the OpenGL color.

UIColor

wxColour DATABASE_EXPORT_SPEC UIColor(const ColorType type)

Provides a wxColour for displaying text with a color.  The UI color of a given ColorType is used in the UI for all text associated with the player who is using that color.

Parameters

typeThe color in question.

Returns

A wxColour containing the UI color.

UIImage

wxImage DATABASE_EXPORT_SPEC UIImage(const ColorType type, 
const wxSize &size = wxSize(16, 16))

Creates a rectangular image of a color.  The image is the solid color with two black bars across the top and bottom.  The image color is the UIColor version of the given ColorType.

Parameters

typeThe color in question.
sizeThe size of the wxImage desired.

Returns

A wxImage containing a rectangluar image of the color.

const wxString DATABASE_EXPORT_SPEC &Name(const ColorType type)
Provides a string representation of the name of a color.
wxColour DATABASE_EXPORT_SPEC GLColor(const ColorType type)
Provides a wxColour for displaying OpenGL objects with a color.
wxColour DATABASE_EXPORT_SPEC UIColor(const ColorType type)
Provides a wxColour for displaying text with a color.
wxImage DATABASE_EXPORT_SPEC UIImage(const ColorType type, 
const wxSize &size = wxSize(16, 16))
Creates a rectangular image of a color.
DatabaseCore provides a set of commonly used Singletons and namespaces that handle important, but mundane aspects of game management, such as available player colors, configuration options, image maniplulation, file paths, and playing sounds.