From: terencehill Date: Wed, 21 Oct 2015 08:22:02 +0000 (+0200) Subject: Merge branch 'master' into terencehill/menu_gametype_tooltips_2 X-Git-Tag: xonotic-v0.8.2~1808^2 X-Git-Url: https://git.rm.cloudns.org/?a=commitdiff_plain;h=refs%2Fmerge-requests%2F243%2Fhead;p=xonotic%2Fxonotic-data.pk3dir.git Merge branch 'master' into terencehill/menu_gametype_tooltips_2 --- 18e2cd311a581f77ba8eb9c5421dd219ff5d760d diff --cc qcsrc/menu/menu.qc index ecadb75bb,fde2c3c1e..8f522d42d --- a/qcsrc/menu/menu.qc +++ b/qcsrc/menu/menu.qc @@@ -557,26 -556,9 +557,26 @@@ void m_tooltip(vector pos menuTooltipAveragedMousePos = menuTooltipAveragedMousePos * (1 - f) + pos * f; f = vlen(pos - menuTooltipAveragedMousePos); if(f < 0.01) + { it = m_findtooltipitem(main, pos); + + if(it.instanceOfListBox && it.isScrolling(it)) + it = world; + + if(it && prev_tooltip != it.tooltip) + { + // fade out if tooltip of a certain item has changed + menuTooltipState = 3; + if(prev_tooltip) + 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; + it = NULL; } fontsize = '1 0 0' * (SKINFONTSIZE_TOOLTIP / conwidth) + '0 1 0' * (SKINFONTSIZE_TOOLTIP / conheight);