浏览代码

GUI Tooltip Timer Fix

This corrects issue #387 by reseting the tooltip timer when the mouse
leaves a mouse element.  This fix was suggested by ParodyGames on
Github.
Peter Robinson 8 年之前
父节点
当前提交
8735dde800
共有 1 个文件被更改,包括 5 次插入1 次删除
  1. 5 1
      engine/source/gui/guiCanvas.cc

+ 5 - 1
engine/source/gui/guiCanvas.cc

@@ -594,8 +594,12 @@ void GuiCanvas::findMouseControl(const GuiEvent &event)
    GuiControl *controlHit = findHitControl(event.mousePoint);
    if(controlHit != static_cast<GuiControl*>(mMouseControl))
    {
-      if(bool(mMouseControl))
+      if (bool(mMouseControl))
+      {
          mMouseControl->onMouseLeave(event);
+         hoverControlStart = Platform::getRealMilliseconds();
+         hoverPositionSet = false;
+      }
       mMouseControl = controlHit;
       mMouseControl->onMouseEnter(event);
    }