Merge branch 'master' into terencehill/menu_gametype_tooltips_2 243/head
authorterencehill <piuntn@gmail.com>
Wed, 21 Oct 2015 08:22:02 +0000 (10:22 +0200)
committerterencehill <piuntn@gmail.com>
Wed, 21 Oct 2015 08:22:02 +0000 (10:22 +0200)
1  2 
qcsrc/menu/menu.qc
qcsrc/menu/xonotic/dialog_settings_game_model.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);