Skip to content

Commit

Permalink
UI|Client|ButtonWidget: Adjusted button down state scaling
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Aug 10, 2013
1 parent a5a806f commit f92c785
Showing 1 changed file with 10 additions and 3 deletions.
13 changes: 10 additions & 3 deletions doomsday/client/src/ui/widgets/buttonwidget.cpp
Expand Up @@ -65,7 +65,7 @@ DENG2_OBSERVES(Action, Triggered)
break;

case Down:
scale.setValue(.9f);
scale.setValue(.95f);
frameOpacity.setValue(0);
break;
}
Expand Down Expand Up @@ -172,9 +172,16 @@ bool ButtonWidget::handleEvent(Event const &event)

case MouseClickFinished:
d->setState(Up);
if(!d->action.isNull() && hitTest(mouse.pos()))
d->updateHover(mouse.pos());
if(hitTest(mouse.pos()))
{
d->action->trigger();
// Notify.
DENG2_FOR_AUDIENCE(Press, i) i->buttonPressed(*this);

if(!d->action.isNull())
{
d->action->trigger();
}
}
return true;

Expand Down

0 comments on commit f92c785

Please sign in to comment.