BWAPI
Skynet/Skynet/DrawingHelper.cpp
Go to the documentation of this file.
00001 #include "DrawingHelper.h"
00002 
00003 void DrawingHelperClass::drawProgressBar(Position bottomLeft, int width, int height, double progressFraction, BWAPI::Color innerBar, BWAPI::Color outerBar)
00004 {
00005         BWAPI::Broodwar->drawBoxMap(bottomLeft.x(), bottomLeft.y() - height, bottomLeft.x() + width, bottomLeft.y(), outerBar, true);
00006 
00007         int progressWidth = static_cast<int>(progressFraction * double(width));
00008 
00009         BWAPI::Broodwar->drawBoxMap(bottomLeft.x() + 1, bottomLeft.y() - height + 1, bottomLeft.x() + progressWidth - 1, bottomLeft.y() - 1, innerBar, true);
00010 }
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines