|
BWAPI
|
#include <DrawingHelper.h>
Public Member Functions | |
| DrawingHelperClass () | |
| void | drawProgressBar (Position bottomLeft, int width, int height, double progressFraction, BWAPI::Color innerBar=BWAPI::Colors::Green, BWAPI::Color outerBar=BWAPI::Colors::Black) |
Definition at line 7 of file DrawingHelper.h.
| DrawingHelperClass::DrawingHelperClass | ( | ) | [inline] |
Definition at line 10 of file DrawingHelper.h.
{}
| void DrawingHelperClass::drawProgressBar | ( | Position | bottomLeft, |
| int | width, | ||
| int | height, | ||
| double | progressFraction, | ||
| BWAPI::Color | innerBar = BWAPI::Colors::Green, |
||
| BWAPI::Color | outerBar = BWAPI::Colors::Black |
||
| ) |
Definition at line 3 of file DrawingHelper.cpp.
References BWAPI::Broodwar, BWAPI::Game::drawBoxMap(), BWAPI::Position::x(), and BWAPI::Position::y().
{
BWAPI::Broodwar->drawBoxMap(bottomLeft.x(), bottomLeft.y() - height, bottomLeft.x() + width, bottomLeft.y(), outerBar, true);
int progressWidth = static_cast<int>(progressFraction * double(width));
BWAPI::Broodwar->drawBoxMap(bottomLeft.x() + 1, bottomLeft.y() - height + 1, bottomLeft.x() + progressWidth - 1, bottomLeft.y() - 1, innerBar, true);
}
1.7.6.1