BWAPI
Public Member Functions
DrawingHelperClass Class Reference

#include <DrawingHelper.h>

List of all members.

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)

Detailed Description

Definition at line 7 of file DrawingHelper.h.


Constructor & Destructor Documentation

Definition at line 10 of file DrawingHelper.h.

{}

Member Function Documentation

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);
}

Here is the call graph for this function:


The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Defines