]> git.rm.cloudns.org Git - xonotic/xonotic-data.pk3dir.git/commitdiff
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

index ecadb75bb0738acba4a827476fd3efb6e363d8f9,fde2c3c1eb7594125c82cb2cac15eb99ae68284d..8f522d42da5779049ca5ce5f79f27ceeddd543f0
@@@ -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);