MCPcopy Create free account
hub / github.com/beefytech/Beef / SetConsoleColor

Function SetConsoleColor

BeefBoot/BootApp.cpp:118–128  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

116}
117
118static bool SetConsoleColor(uint32 fgColor, uint32 bgColor)
119{
120#ifdef _WIN32
121 WORD attr = GetColorCode(fgColor) | (GetColorCode(bgColor) << 4);
122 SetConsoleTextAttribute(GetStdHandle(STD_OUTPUT_HANDLE), attr);
123 SetConsoleTextAttribute(GetStdHandle(STD_ERROR_HANDLE), attr);
124 return true;
125#else
126 return false;
127#endif
128}
129
130
131BootApp::BootApp()

Callers 1

OutputLineMethod · 0.85

Calls 1

GetColorCodeFunction · 0.85

Tested by

no test coverage detected