More UI tweaks

This commit is contained in:
Henrik Rydgard committed 2013-08-13 00:06:48 +02:00
1 parent 22a05c5e38
commit 32218256d7
6 files changed
+23 -10

No files matched your search

+6 -4
View File
@@ -63,6 +63,8 @@ public:
virtual void Update(const InputState &input_state) {
if (down_)
holdFrameCount_++;
else
holdFrameCount_ = 0;
// Hold button for 1.5 seconds to launch the game directly
if (holdFrameCount_ > 90) {
UI::EventParams e;
@@ -115,14 +117,14 @@ void GameButton::Draw(UIContext &dc) {
// Render button
int dropsize = 10;
if (texture) {
if (txOffset) {
dropsize = 3;
y += txOffset * 2;
}
if (HasFocus()) {
// dc.Draw()->DrawImage4Grid(I_DROP_SHADOW, x - dropsize, y, x+w + dropsize, y+h+dropsize*1.5, alphaMul(color, 0.5f), 1.0f);
// dc.Draw()->Flush();
} else {
if (txOffset) {
dropsize = 3;
y += txOffset * 2;
}
dc.Draw()->Flush();
dc.RebindTexture();
dc.Draw()->DrawImage4Grid(I_DROP_SHADOW, x - dropsize, y, x+w + dropsize, y+h+dropsize*1.5, alphaMul(shadowColor, 0.5f), 1.0f);