]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
Set the "forced fade out" state when mouse touches the tooltip, it makes the code...
authorterencehill <piuntn@gmail.com>
Tue, 1 Sep 2015 20:45:44 +0000 (22:45 +0200)
committerterencehill <piuntn@gmail.com>
Tue, 1 Sep 2015 20:45:44 +0000 (22:45 +0200)
qcsrc/menu/menu.qc

index 54e785ef89020f586b765324c30622e03dad133a..db5551a5a78c9d2bb1c1066e75a40faa2a67a096 100644 (file)
@@ -568,6 +568,9 @@ void m_tooltip(vector pos)
                                        strunzone(prev_tooltip);
                                prev_tooltip = strzone(it.tooltip);
                        }
+                       else if(menuTooltipItem && !m_testmousetooltipbox(pos))
+                               menuTooltipState = 3; // fade out if mouse touches it
+
                }
                else
                        it = world;
@@ -625,10 +628,6 @@ void m_tooltip(vector pos)
        else if(menuTooltipState == 2) // re-fade in?
                menuTooltipState = 1;
 
-       if(menuTooltipItem)
-               if(!m_testmousetooltipbox(pos))
-                       menuTooltipState = 2; // fade out if mouse touches it
-
        switch(menuTooltipState)
        {
                case 1: // fade in