Class FButton: mouse click with unsetClickAnimation() works correctly now
This commit is contained in:
parent
de68b4919e
commit
6e1392aa65
|
@ -130,7 +130,7 @@ void FButton::draw()
|
||||||
isNoUnderline = ((flags & NO_UNDERLINE) != 0);
|
isNoUnderline = ((flags & NO_UNDERLINE) != 0);
|
||||||
|
|
||||||
setUpdateVTerm(false);
|
setUpdateVTerm(false);
|
||||||
if ( button_down )
|
if ( button_down && click_animation )
|
||||||
{
|
{
|
||||||
// noshadow + indent one character to the right
|
// noshadow + indent one character to the right
|
||||||
if ( isFlat )
|
if ( isFlat )
|
||||||
|
@ -590,7 +590,7 @@ void FButton::onMouseUp (FMouseEvent* event)
|
||||||
setUp();
|
setUp();
|
||||||
if ( getGeometryGlobal().contains(event->getGlobalPos()) )
|
if ( getGeometryGlobal().contains(event->getGlobalPos()) )
|
||||||
processClick();
|
processClick();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
@ -600,10 +600,13 @@ void FButton::onMouseMove (FMouseEvent* event)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
FPoint gPos = event->getGlobalPos();
|
FPoint gPos = event->getGlobalPos();
|
||||||
if ( getGeometryGlobal().contains(gPos) )
|
if ( click_animation )
|
||||||
setDown();
|
{
|
||||||
else
|
if ( getGeometryGlobal().contains(gPos) )
|
||||||
setUp();
|
setDown();
|
||||||
|
else
|
||||||
|
setUp();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
//----------------------------------------------------------------------
|
//----------------------------------------------------------------------
|
||||||
|
|
Loading…
Reference in New Issue