UI tweaks, bugfixing

This commit is contained in:
Henrik Rydgard committed 2012-10-30 17:36:28 +01:00
1 parent 1ea568990d
commit 23e6b0e374
5 files changed
+35 -26

No files matched your search

+3 -2
View File
@@ -29,17 +29,18 @@ void TouchButton::update(InputState &input_state)
}
}
void TouchButton::draw(DrawBuffer &db, uint32_t color)
void TouchButton::draw(DrawBuffer &db, uint32_t color, uint32_t colorOverlay)
{
float scale = 1.0f;
if (isDown_) {
color |= 0xFF000000;
colorOverlay |= 0xFF000000;
scale = 2.0f;
}
// We only mirror background
db.DrawImageRotated(imageIndex_, x_ + w_/2, y_ + h_/2, scale, rotationAngle_, color, mirror_h_);
if (overlayImageIndex_ != -1)
db.DrawImageRotated(overlayImageIndex_, x_ + w_/2, y_ + h_/2, scale, rotationAngle_, color);
db.DrawImageRotated(overlayImageIndex_, x_ + w_/2, y_ + h_/2, scale, rotationAngle_, colorOverlay);
}
TouchStick::TouchStick(const Atlas *atlas, int bgImageIndex, int stickImageIndex, int stick)