BWAPI  4.2.0
An API for interacting with Starcraft: Broodwar (1.16.1)
Namespaces | Enumerations | Functions
BWAPI::Text Namespace Reference

Namespaces

 Size

Enumerations

enum  Enum {
  Previous = 1,
  Default = 2,
  Yellow = 3,
  White = 4,
  Grey = 5,
  Red = 6,
  Green = 7,
  BrightRed = 8,
  Invisible = 11,
  Blue = 14,
  Teal = 15,
  Purple = 16,
  Orange = 17,
  Align_Right = 18,
  Align_Center = 19,
  Invisible2 = 20,
  Brown = 21,
  PlayerWhite = 22,
  PlayerYellow = 23,
  DarkGreen = 24,
  LightYellow = 25,
  Cyan = 26,
  Tan = 27,
  GreyBlue = 28,
  GreyGreen = 29,
  GreyCyan = 30,
  Turquoise = 31
}

Functions

bool isColor (Text::Enum c)
std::ostreamoperator<< (std::ostream &out, const Text::Enum &t)

Detailed Description

Namespace containing text formatting codes.

Such codes are used in calls to Game::drawText, Game::printf, and Broodwar::operator<<

Enumeration Type Documentation

Enumeration of text formatting codes

Enumerator
Previous 

Uses the previous color that was specified before the current one.

Default 

Uses the default blueish color. This color is used in standard game messages.

Yellow 

A solid yellow.

This yellow is used in notifications and is also the default color when printing text to Broodwar.

White 

A bright white. This is used for timers.

Grey 

A dark grey. This color code will override all color formatting that follows.

Red 

A deep red. This color code is used for error messages.

Green 

A solid green. This color is used for sent messages and resource counters.

BrightRed 

A type of red. This color is used to color the name of the red player.

Invisible 

This code hides all text and formatting that follows.

Blue 

A deep blue. This color is used to color the name of the blue player.

Teal 

A teal color. This color is used to color the name of the teal player.

Purple 

A deep purple. This color is used to color the name of the purple player.

Orange 

A solid orange. This color is used to color the name of the orange player.

Align_Right 

An alignment directive that aligns the text to the right side of the screen.

Align_Center 

An alignment directive that aligns the text to the center of the screen.

Invisible2 

This code hides all text and formatting that follows.

Brown 

A dark brown. This color is used to color the name of the brown player.

PlayerWhite 

A dirty white. This color is used to color the name of the white player.

PlayerYellow 

A deep yellow. This color is used to color the name of the yellow player.

DarkGreen 

A dark green. This color is used to color the name of the green player.

LightYellow 

A bright yellow.

Cyan 

A cyan color. Similar to Default.

Tan 

A tan color.

GreyBlue 

A dark blueish color.

GreyGreen 

A type of Green.

GreyCyan 

A different type of Cyan.

Turquoise 

A bright blue color.

Function Documentation

bool BWAPI::Text::isColor (Text::Enum c)

Checks if the given character is a color-changing control code.

Returns
true if c is a regular color, not Text::Previous, Text::Invisible* or Text::Align*
Since
4.2.0

References isColor().

Referenced by isColor().

std::ostream& BWAPI::Text::operator<< (std::ostreamout, const Text::Enumt )

Standard output stream operator for text formatting codes.

This is used to correctly format the codes for output.

Parameters
outReference to destination output stream.
tReference to the Text formatting code to insert into the output stream.
Returns
Reference to the out parameter that was passed in.