[WheelNotifyIcon] add BlinkPlayersBest metric

This commit is contained in:
AJ Kelly
2010-12-19 13:42:20 -06:00
parent e15e38a1a7
commit ef46e6c088
3 changed files with 11 additions and 4 deletions
+4
View File
@@ -13,6 +13,10 @@ _____________________________________________________________________________
sm-ssc v1.2 | 201012xx sm-ssc v1.2 | 201012xx
-------------------------------------------------------------------------------- --------------------------------------------------------------------------------
20101219
--------
* [WheelNotifyIcon] add BlinkPlayersBest metric [freem]
20101218 20101218
-------- --------
* [MusicWheelItem] Add OverPart. [freem] * [MusicWheelItem] Add OverPart. [freem]
+1
View File
@@ -1187,6 +1187,7 @@ AfterSetCommand=%TextBannerAfterSet
[WheelNotifyIcon] [WheelNotifyIcon]
ShowTraining=false ShowTraining=false
BlinkPlayersBest=true
# 04 # # 04 #
[Screen] [Screen]
+6 -4
View File
@@ -13,6 +13,7 @@
*/ */
static ThemeMetric<bool> SHOW_TRAINING ("WheelNotifyIcon","ShowTraining"); static ThemeMetric<bool> SHOW_TRAINING ("WheelNotifyIcon","ShowTraining");
static ThemeMetric<bool> BLINK_BEST_ICON ("WheelNotifyIcon","BlinkPlayersBest");
WheelNotifyIcon::WheelNotifyIcon() WheelNotifyIcon::WheelNotifyIcon()
{ {
@@ -49,15 +50,16 @@ void WheelNotifyIcon::SetFlags( Flags flags )
m_vIconsToShow.push_back( training ); m_vIconsToShow.push_back( training );
// HACK: Make players best blink if it's the only icon // If BLINK_BEST_ICON, make player's best icon blink if it's the only icon.
// TODO: metric this. use m_bPlayersBestHack as variable name, lol -aj if( m_vIconsToShow.size() == 1 && BLINK_BEST_ICON )
if( m_vIconsToShow.size() == 1 )
{ {
if( m_vIconsToShow[0] >= best1 && m_vIconsToShow[0] <= best3 ) if( m_vIconsToShow[0] >= best1 && m_vIconsToShow[0] <= best3 )
m_vIconsToShow.push_back( empty ); m_vIconsToShow.push_back( empty );
} }
m_vIconsToShow.resize( min(m_vIconsToShow.size(),2u) ); // crop to most important 2 // crop to most important 2
// todo: Let themer handle this? -aj
m_vIconsToShow.resize( min(m_vIconsToShow.size(),2u) );
// Broadcast Set message so items can react. (futures) -aj // Broadcast Set message so items can react. (futures) -aj
//Message msg("Set"); //Message msg("Set");