namespace
TextNamespace containing text formatting codes.
Contents
- Reference
Such codes are used in calls to Game::
Namespaces
- namespace Size
- Namespace containing text sizes.
Enums
- 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 }
- Enumeration of text formatting codes
Functions
-
auto isColor(Text::
Enum c) -> bool since v4.2.0 - Checks if the given character is a color-changing control code.
-
auto operator<<(std::
ostream& out, const Text:: Enum& t) -> std:: ostream& - Standard output stream operator for text formatting codes.
Enum documentation
enum BWAPI:: Text:: Enum
Enumeration of text formatting codes
Enumerators | |
---|---|
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) since v4.2.0
Checks if the given character is a color-changing control code.
Returns | true if c is a regular color, not Text:: |
---|
std:: ostream& BWAPI:: Text:: operator<<(std:: ostream& out,
const Text:: Enum& t)
Standard output stream operator for text formatting codes.
Parameters | |
---|---|
out | Reference to destination output stream. |
t | Reference to the Text formatting code to insert into the output stream. |
Returns | Reference to the out parameter that was passed in. |
This is used to correctly format the codes for output.