diff options
author | Andrei Karas <akaras@inbox.ru> | 2012-11-06 21:13:16 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2012-11-07 12:46:08 +0300 |
commit | d812d9fac7bae4eff66a5ce8275be19d0ca77a32 (patch) | |
tree | 7f9619d23a44202a76282849bb1284773302309f /src/gui/widgets/progressbar.cpp | |
parent | 1bcaac517036751a8fee9ff3d6561f5866e6969e (diff) | |
download | ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.gz ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.bz2 ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.tar.xz ManaVerse-d812d9fac7bae4eff66a5ce8275be19d0ca77a32.zip |
Add own profiler and profiler info to some code.
Diffstat (limited to 'src/gui/widgets/progressbar.cpp')
-rw-r--r-- | src/gui/widgets/progressbar.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gui/widgets/progressbar.cpp b/src/gui/widgets/progressbar.cpp index 590447b89..ef3aa19a0 100644 --- a/src/gui/widgets/progressbar.cpp +++ b/src/gui/widgets/progressbar.cpp @@ -90,6 +90,7 @@ ProgressBar::~ProgressBar() void ProgressBar::logic() { + BLOCK_START("ProgressBar::logic") if (mSmoothColorChange && mColorToGo != mColor) { // Smoothly changing the color for a nicer effect. @@ -115,6 +116,7 @@ void ProgressBar::logic() if (mProgressToGo < mProgress) mProgress = std::max(0.0f, mProgress - 0.005f); } + BLOCK_END("ProgressBar::logic") } void ProgressBar::updateAlpha() @@ -139,11 +141,11 @@ void ProgressBar::updateAlpha() void ProgressBar::draw(gcn::Graphics *graphics) { + BLOCK_START("ProgressBar::draw") updateAlpha(); - mColor.a = static_cast<int>(mAlpha * 255); - render(static_cast<Graphics*>(graphics)); + BLOCK_END("ProgressBar::draw") } void ProgressBar::setProgress(const float progress) |