BitmapText::BitmapText() { // Loading these theme metrics is slow, so only do it every 20th time. // todo: why not check to see if you need to bother updating this at all? -aj static int iReloadCounter = 0; if( iReloadCounter % 20==0 ) { RAINBOW_COLORS.resize( NUM_RAINBOW_COLORS ); for( unsigned i = 0; i < RAINBOW_COLORS.size(); ++i ) RAINBOW_COLORS[i] = RAINBOW_COLOR(i); } iReloadCounter++; m_pFont = NULL; m_bUppercase = false; m_bRainbowScroll = false; m_bJitter = false; m_iWrapWidthPixels = -1; m_fMaxWidth = 0; m_fMaxHeight = 0; m_iVertSpacing = 0; m_bHasGlowAttribute = false; // We'd be better off not adding strokes to things we can't control // themewise (ScreenDebugOverlay for example). -Midiman m_StrokeColor = RageColor(0,0,0,0); // Never, this way we dont have awkward settings between themes. -Midiman SetShadowLength( 0 ); // SM4SVN r28328, "draw glow using stroke texture" forces the BitmapText to // glow both the inner and stroke elements. This makes BitmapText elements // with an invisible stroke have a glowing stroke instead. Not good. -aj m_TextGlowMode = TextGlowMode_Both; // Both used for compatibility with SM4 }
BitmapText::BitmapText() { // Loading these theme metrics is slow, so only do it ever 20th time. static int iReloadCounter = 0; if( iReloadCounter%20==0 ) { RAINBOW_COLORS.resize( NUM_RAINBOW_COLORS ); for( unsigned i = 0; i < RAINBOW_COLORS.size(); ++i ) RAINBOW_COLORS[i] = RAINBOW_COLOR(i); } iReloadCounter++; m_pFont = NULL; m_bUppercase = false; m_bRainbowScroll = false; m_bJitter = false; m_iWrapWidthPixels = -1; m_fMaxWidth = 0; m_fMaxHeight = 0; m_iVertSpacing = 0; m_bHasGlowAttribute = false; m_StrokeColor = RageColor(1,1,1,1); SetShadowLength( 4 ); }
BitmapText::BitmapText() { // Loading these theme metrics is slow, so only do it ever 20th time. static int iReloadCounter = 0; if( iReloadCounter%20==0 ) { for( int i = 0; i < NUM_RAINBOW_COLORS; ++i ) RAINBOW_COLORS[i] = RAINBOW_COLOR(i); } iReloadCounter++; m_pFont = NULL; m_bRainbow = false; m_iWrapWidthPixels = -1; m_fMaxWidth = 0; m_fMaxHeight = 0; SetShadowLength( 4 ); }