void ServerOptionsPanel::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); vgui::HFont defaultfont = pScheme->GetFont( "MissionChooserFont", IsProportional() ); if (defaultfont == vgui::INVALID_FONT) { defaultfont = pScheme->GetFont( "Default", IsProportional() ); } m_HostNameLabel->SetFont(defaultfont); m_pHostNameEntry->SetFont(defaultfont); m_pPasswordLabel->SetFont(defaultfont); m_pServerPasswordEntry->SetFont(defaultfont); m_pMaxPlayersLabel->SetFont(defaultfont); m_pMaxPlayersCombo->SetFont(defaultfont); m_pLANCheck->SetFont(defaultfont); m_pCancelButton->SetFont(defaultfont); Color white(255,255,255,255); Color nothing(0, 0, 0, 0); m_HostNameLabel->SetFgColor(white); m_pHostNameEntry->SetFgColor(white); m_pPasswordLabel->SetFgColor(white); m_pServerPasswordEntry->SetFgColor(white); m_pMaxPlayersLabel->SetFgColor(white); m_pMaxPlayersCombo->SetFgColor(white); m_pLANCheck->SetFgColor(white); m_pLANCheck->SetDefaultColor(white, nothing); m_pLANCheck->SetArmedColor(white, nothing); m_pLANCheck->SetDepressedColor(white, nothing); }
void CASW_VGUI_Computer_Menu::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(false); SetBgColor( Color(0,0,0,0) ); SetMouseInputEnabled(true); vgui::HFont LabelFont = pScheme->GetFont( "Default", IsProportional() ); // hide the menu at first Color white(255,255,255,255); Color blue(19,20,40, 255); for (int i=0;i<ASW_COMPUTER_MAX_MENU_ITEMS;i++) { //if (!m_bSetAlpha) //{ m_pMenuLabel[i]->SetAlpha(0); m_pMenuIcon[i]->SetAlpha(0); m_pMenuIconShadow[i]->SetAlpha(0); //} m_pMenuLabel[i]->SetFont(LabelFont); m_pMenuLabel[i]->SetPaintBackgroundEnabled(true); m_pMenuLabel[i]->SetContentAlignment(vgui::Label::a_center); m_pMenuLabel[i]->SetBgColor(Color(19,20,40,255)); m_pMenuLabel[i]->SetColors(white, white, white, white, blue); m_pMenuLabel[i]->SetBorders("TitleButtonBorder", "TitleButtonBorder"); m_pMenuLabel[i]->SetPaintBackgroundType(2); } vgui::HFont DefaultFont = pScheme->GetFont( "Default", IsProportional() ); vgui::HFont XLargeFont = pScheme->GetFont( "DefaultExtraLarge", IsProportional() ); m_pAccessDeniedLabel->SetFont(XLargeFont); m_pAccessDeniedLabel->SetFgColor(Color(255,0,0,255)); m_pInsufficientRightsLabel->SetFont(DefaultFont); m_pInsufficientRightsLabel->SetFgColor(Color(255,255,255,255)); //if (!m_bSetAlpha) //{ m_pBlackBar[0]->SetAlpha(0); m_pBlackBar[1]->SetAlpha(0); m_pAccessDeniedLabel->SetAlpha(0); m_pInsufficientRightsLabel->SetAlpha(0); //} if (!m_bSetAlpha) { m_bSetAlpha = true; } else { if (m_hCurrentPage.Get()) HideMenu(true); else ShowMenu(); // makes sure the right things are faded in } }
void CASW_VGUI_Computer_Weather::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(false); SetBgColor( Color(0,0,0,0) ); SetMouseInputEnabled(true); vgui::HFont LabelFont = pScheme->GetFont( "Default", IsProportional() ); m_pWarningLabel->SetFont(LabelFont); m_pBackButton->SetPaintBackgroundEnabled(true); m_pBackButton->SetFont(LabelFont); m_pBackButton->SetPaintBackgroundEnabled(true); m_pBackButton->SetContentAlignment(vgui::Label::a_center); m_pBackButton->SetBorders("TitleButtonBorder", "TitleButtonBorder"); Color white(255,255,255,255); Color blue(19,20,40, 255); m_pBackButton->SetColors(white, white, white, white, blue); m_pBackButton->SetPaintBackgroundType(2); vgui::HFont LargeTitleFont = pScheme->GetFont( "DefaultLarge", IsProportional() ); //vgui::HFont TitleFont = pScheme->GetFont("Default"); m_pTitleLabel->SetFgColor(Color(255,255,255,255)); m_pTitleLabel->SetFont(LargeTitleFont); m_pTitleLabel->SetContentAlignment(vgui::Label::a_center); for (int i=0; i<ASW_WEATHER_ENTRIES; i++) { m_pWeatherLabel[i]->SetFont(LabelFont); m_pWeatherValue[i]->SetFont(LabelFont); ApplySettingAndFadeLabelIn(m_pWeatherLabel[i]); ApplySettingAndFadeLabelIn(m_pWeatherValue[i]); } ApplySettingAndFadeLabelIn(m_pWarningLabel); m_pTitleIcon->SetImage("swarm/Computer/IconWeather"); m_pTitleIconShadow->SetImage("swarm/Computer/IconWeather"); // fade them in if (!m_bSetAlpha) { m_bSetAlpha = true; m_pBackButton->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pBackButton, "Alpha", 255, 0, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); m_pTitleIcon->SetAlpha(0); m_pTitleIconShadow->SetAlpha(0); m_pTitleLabel->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pTitleLabel, "Alpha", 255, 0.2f, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); vgui::GetAnimationController()->RunAnimationCommand(m_pTitleIcon, "Alpha", 255, 0.2f, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); vgui::GetAnimationController()->RunAnimationCommand(m_pTitleIconShadow, "Alpha", 30, 0.2f, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); } }
void CASWChatHistoryEcho::ApplySchemeSettings( vgui::IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); SetPaintBackgroundEnabled(false); SetFont( pScheme->GetFont( "Default", IsProportional() ) ); SetAlpha( 255 ); Msg( "set history echo to %d\n", IsProportional() ); }
void CASW_Difficulty_Chooser::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); vgui::HFont defaultfont = pScheme->GetFont( "DefaultButton", IsProportional() ); m_pCancelButton->SetFont(defaultfont); SetPaintBackgroundType(2); }
void PlayerListPanel::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); LoadControlSettings( "resource/ui/PlayerListPanel.res" ); vgui::HFont DefaultFont = pScheme->GetFont( "Default", IsProportional() ); m_pPlayerHeader->SetFont(DefaultFont); m_pPlayerHeader->SetFgColor(Color(255,255,255,255)); m_pMarinesHeader->SetFont(DefaultFont); m_pMarinesHeader->SetFgColor(Color(255,255,255,255)); m_pPingHeader->SetFont(DefaultFont); m_pPingHeader->SetFgColor(Color(255,255,255,255)); SetPaintBackgroundEnabled(true); SetPaintBackgroundType(0); // more translucent when viewed ingame if (GetParent() && GetParent()->GetParent() && GetParent()->GetParent() == GetClientMode()->GetViewport()) SetBgColor(Color(0,0,0,128)); else SetBgColor(Color(0,0,0,220)); m_pLeaderButtonsBackground->SetPaintBackgroundEnabled(false); // temp removal of this m_pLeaderButtonsBackground->SetPaintBackgroundType(0); m_pLeaderButtonsBackground->SetBgColor(Color(0,0,0,128)); m_pStartSavedCampaignVoteButton->m_pLabel->SetFont(DefaultFont); Color col_white(255,255,255,255); Color col_grey(128,128,128,255); m_pStartSavedCampaignVoteButton->SetColors(col_white, col_grey, col_white, col_grey, col_white); }
void CainMailPanel::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); vgui::HFont font = pScheme->GetFont( "Default", IsProportional() ); for (int i=0;i<ASW_CAIN_MAIL_LINES;i++) { m_MailLines[i]->SetFgColor(Color(255,255,255,255)); m_MailLines[i]->SetContentAlignment(vgui::Label::a_northwest); m_MailLines[i]->SetFont(font); m_MailLines[i]->SetAlpha(0); float fDelay = 0.0f; switch(i) { case 0: break; case 1: fDelay += 1.0f; break; case 2: fDelay += 2.0f; break; case 3: fDelay += 4.0f; break; // lt cain case 4: fDelay += 6.0f; break; case 5: fDelay += 8.0f; break; case 6: fDelay += 10.0f; break; // eta case 7: fDelay += 14.0f; break; default: fDelay += 15.0f; break; } vgui::GetAnimationController()->RunAnimationCommand(m_MailLines[i], "Alpha", 255, fDelay, 2.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); } }
void CASW_VGUI_Computer_Splash::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(false); SetBgColor( Color(0,0,0,0) ); SetMouseInputEnabled(true); if (!m_bSetAlpha) { m_pLogoImage->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pLogoImage, "Alpha", 255, 0.9f, 1.7f, vgui::AnimationController::INTERPOLATOR_LINEAR); m_pLogoGlitchImage->SetAlpha(0); m_pSloganLabel->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pSloganLabel, "Alpha", 255, 0.9f, 1.7f, vgui::AnimationController::INTERPOLATOR_LINEAR); m_pSynTekLabel->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pSynTekLabel, "Alpha", 255, 0.9f, 1.7f, vgui::AnimationController::INTERPOLATOR_LINEAR); } vgui::HFont SloganFont = pScheme->GetFont( "CleanHUD", IsProportional() ); m_pSloganLabel->SetFont(SloganFont); m_pSloganLabel->SetFgColor(Color(255,255,255,255)); vgui::HFont HeaderFont = pScheme->GetFont( "DefaultLarge", IsProportional() ); m_pSynTekLabel->SetFont(HeaderFont); m_pSynTekLabel->SetFgColor(Color(255,255,255,255)); vgui::HFont ScrollerFont = pScheme->GetFont( "Courier", IsProportional() ); for (int i=0;i<ASW_SPLASH_SCROLL_LINES;i++) { m_pScrollLine[i]->SetFont(ScrollerFont); m_pScrollLine[i]->SetFgColor(Color(19,21,41,255)); m_pScrollLine[i]->SetAlpha(0); // it's okay for these to be hidden if player changes res and this gets called again } if (m_bSlidOut) { m_pSloganLabel->SetAlpha(0); m_pLogoGlitchImage->SetAlpha(0); } m_bSetAlpha = true; }
void CASW_Hotbar_Entry::ApplySchemeSettings( vgui::IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); m_pMarineNameLabel->SetFgColor( Color( 168, 168, 192, 255 ) ); m_pMarineNameLabel->SetFont( pScheme->GetFont( "VerdanaVerySmall", IsProportional() ) ); m_pKeybindLabel->SetFgColor( Color( 255, 255, 255, 255 ) ); m_pKeybindLabel->SetFont( pScheme->GetFont( "Default", IsProportional() ) ); m_pQuantityLabel->SetFgColor( Color( 66, 142, 192, 255 ) ); m_pQuantityLabel->SetFont( pScheme->GetFont( "DefaultSmall", IsProportional() ) ); m_pWeaponImage->SetDrawColor( Color( 66, 142, 192, 255 ) ); SetBgColor( Color( 32, 32, 64, 128 ) ); UpdateImage(); }
void ChatEchoPanel::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); m_hFont = pScheme->GetFont( "Default", IsProportional() ); m_pChatInputLine->SetFont(m_hFont); int line_tall = vgui::surface()->GetFontTall(m_hFont); m_pChatInputLine->SetTall(line_tall); m_pChatInputLine->SetVerticalScrollbar(false); m_pChatInputLine->SetVisible(false); }
void CASW_Difficulty_Entry::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); m_pDifficultyDescriptionLabel->SetContentAlignment(vgui::Label::a_northwest); m_pDifficultyDescriptionLabel->InvalidateLayout(); vgui::HFont defaultfont = pScheme->GetFont( "MissionChooserFont", IsProportional() ); m_pDifficultyDescriptionLabel->SetFont(defaultfont); m_pDifficultyDescriptionLabel->InvalidateLayout(); m_pDifficultyDescriptionLabel->GetTextImage()->RecalculateNewLinePositions(); m_pDifficultyDescriptionLabel->SetFgColor(Color(160,160,160,255)); m_pDifficultyLabel->SetContentAlignment(vgui::Label::a_northwest); m_pDifficultyLabel->InvalidateLayout(); m_hDefaultFont = pScheme->GetFont( "MissionChooserFont", IsProportional() ); m_pDifficultyLabel->SetFont(m_hDefaultFont); m_pDifficultyLabel->InvalidateLayout(); m_pDifficultyLabel->GetTextImage()->RecalculateNewLinePositions(); m_pDifficultyLabel->SetFgColor(Color(255,255,255,255)); }
void SwarmopediaTopicButton::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); m_hFont = pScheme->GetFont( "DefaultButton", IsProportional() ); m_pLabel->SetFont(m_hFont); if (m_iSectionHeader <= 0) m_pLabel->SetFgColor(Color(66,142,192,255)); else m_pLabel->SetFgColor(Color(192,192,192,255)); }
void CASW_Medal_Collection_Frame::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); m_pCancelButton->SetFont( pScheme->GetFont( "DefaultButton", IsProportional() ) ); SetPaintBackgroundType(2); //m_pCancelButton->SetDefaultBorder(pScheme->GetBorder("ButtonBorder")); //m_pCancelButton->SetDepressedBorder(pScheme->GetBorder("ButtonBorder")); //m_pCancelButton->SetKeyFocusBorder(pScheme->GetBorder("ButtonBorder")); //m_pCancelButton->SetDefaultColor(Color(255,128,0,255), Color(0,0,0,255)); //m_pCancelButton->SetArmedColor(Color(255,128,0,255), Color(65,74,96,255)); //m_pCancelButton->SetDepressedColor(Color(255,128,0,255), Color(65,74,96,255)); }
void TechMarineFailPanel::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); m_hFont = pScheme->GetFont( "Default", IsProportional() ); m_pFailedMessage->SetFgColor(pScheme->GetColor("Red", Color(255,0,0,255))); m_pFailedMessage->SetFont(m_hFont); m_pReasonMessage->SetFgColor(pScheme->GetColor("White", Color(255,255,255,255))); m_pReasonMessage->SetFont(m_hFont); m_pBackground->SetPaintBackgroundType( 2 ); m_pBackground->SetBgColor( Color( 35, 41, 57, 210 ) ); }
void CASW_Hud_Powerups::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetBgColor( Color( 255, 255, 255, 200 ) ); SetPaintBackgroundType(0); SetPaintBackgroundEnabled( false ); m_pStringLabel->SetFgColor(Color(200,200,200,255)); m_pStringLabel->SetFont( pScheme->GetFont( "DefaultSmall", IsProportional() ) );//VerdanaSmall m_pStringLabel->SetContentAlignment( vgui::Label::a_west ); SetMouseInputEnabled(false); }
void ComboBoxButton::ApplySchemeSettings(IScheme *pScheme) { Button::ApplySchemeSettings(pScheme); SetFont(pScheme->GetFont("Marlett", IsProportional())); SetContentAlignment(Label::a_west); SetTextInset(3, 0); SetDefaultBorder(pScheme->GetBorder("ScrollBarButtonBorder")); // arrow changes color but the background doesnt. SetDefaultColor(GetSchemeColor("ComboBoxButton.ArrowColor", pScheme), GetSchemeColor("ComboBoxButton.BgColor", pScheme)); SetArmedColor(GetSchemeColor("ComboBoxButton.ArmedArrowColor", pScheme), GetSchemeColor("ComboBoxButton.BgColor", pScheme)); SetDepressedColor(GetSchemeColor("ComboBoxButton.ArmedArrowColor", pScheme), GetSchemeColor("ComboBoxButton.BgColor", pScheme)); m_DisabledBgColor = GetSchemeColor("ComboBoxButton.DisabledBgColor", pScheme); }
void CASW_VGUI_Computer_Frame::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(true); SetBgColor( Color(0,0,0,255) ); SetMouseInputEnabled(true); vgui::HFont LabelFont = pScheme->GetFont( "Default", IsProportional() ); Color white(255,255,255,255); Color blue(19,20,40, 255); m_pLogoffLabel->SetFont(LabelFont); m_pLogoffLabel->SetPaintBackgroundEnabled(true); m_pLogoffLabel->SetContentAlignment(vgui::Label::a_center); m_pLogoffLabel->SetBgColor(Color(19,20,40,255)); m_pLogoffLabel->SetBorders("TitleButtonBorder", "TitleButtonBorder"); m_pLogoffLabel->SetColors(white, white, white, white, blue); m_pLogoffLabel->SetPaintBackgroundType(2); // fade scanlines in if (!m_bSetAlpha) { m_bSetAlpha = true; m_pScan[0]->SetAlpha(0); m_pScan[1]->SetAlpha(0); m_pScan[2]->SetAlpha(0); // alphas were 85 170 255 vgui::GetAnimationController()->RunAnimationCommand(m_pScan[0], "Alpha", 42, 0, 2.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); vgui::GetAnimationController()->RunAnimationCommand(m_pScan[1], "Alpha", 85, 0, 2.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); vgui::GetAnimationController()->RunAnimationCommand(m_pScan[2], "Alpha", 128, 0, 2.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); m_pBackdropImage->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pBackdropImage, "Alpha", 255, 0, 2.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); } else { m_pScan[0]->SetAlpha(42); m_pScan[1]->SetAlpha(85); m_pScan[2]->SetAlpha(128); m_pBackdropImage->SetAlpha(255); } }