void CTFSlider::paintBackground( void ) { int wide,tall,nobx,noby; getPaintSize(wide,tall); getNobPos(nobx,noby); // Border drawSetColor( Scheme::sc_secondary1 ); drawOutlinedRect( 0,0,wide,tall ); if( isVertical() ) { // Nob Fill drawSetColor( Scheme::sc_primary2 ); drawFilledRect( 0,nobx,wide,noby ); // Nob Outline drawSetColor( Scheme::sc_primary1 ); drawOutlinedRect( 0,nobx,wide,noby ); } else { // Nob Fill drawSetColor( Scheme::sc_primary2 ); drawFilledRect( nobx,0,noby,tall ); // Nob Outline drawSetColor( Scheme::sc_primary1 ); drawOutlinedRect( nobx,0,noby,tall ); } }
void CommandButton::paintBackground() { if ( m_bFlat ) { if ( isArmed() ) { // Orange Border drawSetColor( Scheme::sc_secondary1 ); drawOutlinedRect(0,0,_size[0],_size[1]); } } else { if ( isArmed() ) { // Orange highlight background drawSetColor( Scheme::sc_primary2 ); drawFilledRect(0,0,_size[0],_size[1]); } // Orange Border drawSetColor( Scheme::sc_secondary1 ); drawOutlinedRect(0,0,_size[0],_size[1]); } }
void Drawing::drawOutlinedBox(int x, int y, int w, int h, Color color, Color colorOutline) { drawOutlinedRect(x, y, w, h, color); interfaces::surface->DrawSetColor(colorOutline.r(), colorOutline.g(), colorOutline.b(), colorOutline.a()); interfaces::surface->DrawOutlinedRect(x + 1, y + 1, x + w - 1, y + h - 1); interfaces::surface->DrawOutlinedRect(x - 1, y - 1, x + w + 1, y + h + 1); }
void CVoiceVGUITweakDlg::paintBackground() { BaseClass::paintBackground(); // Draw our border. int w,h; getSize(w,h); drawSetColor(128,128,128,1); drawOutlinedRect(0, 0, w, h); float volume = m_MicVolume.GetValue(); m_pVoiceTweak->SetControlFloat(MicrophoneVolume, volume); m_pVoiceTweak->SetControlFloat(OtherSpeakerScale, m_SpeakerVolume.GetValue()); }