void CWebWindow::ShowPanel( bool bShow ) { int x, y; GetPos( x, y ); if ( x < 0 || y < 0 ) { SetPos( 0, 0 ); } if ( BaseClass::IsVisible() == bShow ) return; if ( bShow ) { SetVisible( true ); Activate (); SetMouseInputEnabled( true ); RequestFocus (); m_pHTMLMessage->OpenURL( m_czURL, null, true ); } else { SetVisible( false ); SetMouseInputEnabled( false ); } }
void CBaseHudChat::ApplySchemeSettings( vgui::IScheme *pScheme ) { BaseClass::ApplySchemeSettings( pScheme ); SetPaintBackgroundEnabled( false ); SetKeyBoardInputEnabled( false ); SetMouseInputEnabled( false ); m_nVisibleHeight = 0; // Put input area at bottom if ( m_pChatInput ) { int w, h; GetSize( w, h ); m_pChatInput->SetBounds( 1, h - m_iFontHeight - 1, w-2, m_iFontHeight ); } #ifdef HL1_CLIENT_DLL SetBgColor( Color( 0, 0, 0, 0 ) ); SetFgColor( Color( 0, 0, 0, 0 ) ); #else SetBgColor( Color( 0, 0, 0, 100 ) ); #endif }
// Constuctor: Initializes the Panel CVRPanel::CVRPanel(vgui::VPANEL parent) : BaseClass(NULL, "VRPanel") { int w, h; w = ScreenWidth(); h = ScreenHeight(); SetParent( parent ); SetKeyBoardInputEnabled( true ); SetMouseInputEnabled( true ); SetProportional( false ); SetVisible( true ); SetSize(255, 255); SetPos(398, 240); vgui::ivgui()->AddTickSignal( GetVPanel(), 100 ); // Label // Image m_pImage = new vgui::ImagePanel(this, "imgCalibrate"); m_pImage->SetImage("hydra_calibrate"); m_pImage->SetPos(0, 0); m_pImage->SetSize(255, 255); m_pImage->SetShouldScaleImage(true); m_pImage->SetScaleAmount(.75); DevMsg("VRPanel has been constructed\n"); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseHudChat::StopMessageMode( void ) { #ifndef _XBOX engine->ClientCmd_Unrestricted( "gameui_allowescapetoshow\n" ); SetKeyBoardInputEnabled( false ); SetMouseInputEnabled( false ); if ( GetChatHistory() ) { GetChatHistory()->SetPaintBorderEnabled( false ); GetChatHistory()->GotoTextEnd(); GetChatHistory()->SetMouseInputEnabled( false ); GetChatHistory()->SetVerticalScrollbar( false ); GetChatHistory()->ResetAllFades( false, true, CHAT_HISTORY_FADE_TIME ); GetChatHistory()->SelectNoText(); } //Clear the entry since we wont need it anymore. m_pChatInput->ClearEntry(); m_flHistoryFadeTime = gpGlobals->curtime + CHAT_HISTORY_FADE_TIME; #endif }
VideoPanel::VideoPanel( unsigned int nXPos, unsigned int nYPos, unsigned int nHeight, unsigned int nWidth ) : BaseClass( NULL, "VideoPanel" ), m_BIKHandle( BIKHANDLE_INVALID ), m_nPlaybackWidth( 0 ), m_nPlaybackHeight( 0 ) { vgui::VPANEL pParent = enginevgui->GetPanel( PANEL_GAMEUIDLL ); SetParent( pParent ); SetVisible( false ); // Must be passed in, off by default m_szExitCommand[0] = '\0'; m_bBlackBackground = true; SetKeyBoardInputEnabled( true ); SetMouseInputEnabled( false ); SetProportional( false ); SetVisible( true ); SetPaintBackgroundEnabled( false ); SetPaintBorderEnabled( false ); // Set us up SetTall( nHeight ); SetWide( nWidth ); SetPos( nXPos, nYPos ); SetScheme(vgui::scheme()->LoadSchemeFromFile( "resource/VideoPanelScheme.res", "VideoPanelScheme")); LoadControlSettings("resource/UI/VideoPanel.res"); }
CDialog_RendertargetList::CDialog_RendertargetList( Panel *parent ) : CBaseDiag( parent, NULL, "_rt_list" ) { SetSizeable( false ); SetVisible( true ); SetMouseInputEnabled( true ); SetKeyBoardInputEnabled( true ); Activate(); m_pList_RT = new PanelListPanel( this, "rtlist" ); m_pList_RT->SetNumColumns( 2 ); m_pList_RT->SetFirstColumnWidth( 200 ); FillList(); LoadControlSettings( "shadereditorui/vgui/dialog_rendertarget_list.res" ); SetTitle( "Rendertarget manager", true ); DoModal(); SetDeleteSelfOnClose( true ); MoveToCenterOfScreen(); }
void CHudChat::ApplySchemeSettings( vgui::IScheme *pScheme ) { if ( m_bIntermissionSet ) LoadControlSettings( "resource/UI/BaseChat_Intermission.res" ); else LoadControlSettings( "resource/UI/BaseChat.res" ); m_IScheme = pScheme; // Skip over the BaseChat so we don't reload non-intermission settings EditablePanel::ApplySchemeSettings( pScheme ); SetPaintBackgroundType( 2 ); SetPaintBorderEnabled( true ); SetPaintBackgroundEnabled( true ); SetKeyBoardInputEnabled( false ); SetMouseInputEnabled( false ); m_nVisibleHeight = 0; Color cColor = pScheme->GetColor( "DullWhite", GetBgColor() ); SetBgColor( Color ( cColor.r(), cColor.g(), cColor.b(), CHAT_HISTORY_ALPHA ) ); GetChatHistory()->SetVerticalScrollbar( false ); }
ProtectedMethod void CCreditPanel::ShowPanel( bool bShow ) { if ( BaseClass::IsVisible() == bShow ) return; if ( bShow ) { SetMouseInputEnabled( true ); Activate(); RequestFocus(); } else { SetVisible( false ); SetMouseInputEnabled( false ); } }
void CGUICommunity::ShowPanel( bool bShow ) { if ( BaseClass::IsVisible() == bShow ) return; if ( bShow ) { SetMouseInputEnabled( true ); Activate(); RequestFocus(); } else { SetVisible( false ); SetMouseInputEnabled( false ); } }
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 CASW_VGUI_Skip_Intro::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(false); SetBgColor( Color(0,0,0,255) ); SetMouseInputEnabled(true); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CCommentaryModelViewer::ShowPanel(bool bShow) { if ( BaseClass::IsVisible() == bShow ) return; if ( bShow ) { Activate(); SetMouseInputEnabled( true ); } else { SetVisible( false ); SetMouseInputEnabled( false ); } m_pViewPort->ShowBackGround( bShow ); }
CBaseHudChatInputLine::CBaseHudChatInputLine( CBaseHudChat *parent, char const *panelName ) : vgui::Panel( parent, panelName ) { SetMouseInputEnabled( false ); m_pPrompt = new vgui::Label( this, "ChatInputPrompt", L"Enter text:" ); m_pInput = new CBaseHudChatEntry( this, "ChatInput", parent ); m_pInput->SetMaximumCharCount( 127 ); }
FontTestPanel::FontTestPanel(vgui::Panel *parent, const char *name) : vgui::Panel(parent, name) { for (int i=0;i<ASW_FONT_TEST_LABELS;i++) { m_pLabel[i] = new vgui::Label(this, "FontLabel", "Alien Swarm: 12345 MEOW"); m_pLabel[i]->SetContentAlignment(vgui::Label::a_northwest); } SetMouseInputEnabled(true); m_iPage = 0; }
FadeInPanel::FadeInPanel(vgui::Panel *parent, const char *name) : vgui::Panel(parent, name) { //Msg("%f: FadeInPanel::FadeInPanel\n", gpGlobals->curtime); m_pBlackImage = new vgui::ImagePanel(this, "FadeInImage"); m_pBlackImage->SetImage("swarm/HUD/ASWHUDBlackBar"); m_pBlackImage->SetShouldScaleImage(true); m_pBlackImage->SetMouseInputEnabled(false); SetMouseInputEnabled(false); m_bSlowRemove = false; m_fIngameTime = 0; m_bFastRemove = false; }
void CGUIListenServer::ShowPanel( bool bShow ) { if ( BaseClass::IsVisible() == bShow ) return; if ( bShow ) { int x, y, w, h; vgui::surface()->GetWorkspaceBounds( x, y, w, h ); SetPos( 0, 0 ); SetSize( w, h ); SetMouseInputEnabled( true ); Activate(); RequestFocus(); } else { SetVisible( false ); SetMouseInputEnabled( false ); } }
CSmartTooltip::CSmartTooltip( Panel *parent, const char *pElementname ) : BaseClass( parent, pElementname ) { m_iParamHighlight = 0; m_iMode = STTIPMODE_NORMAL; m_pCurObject = NULL; m_iFont = GetFontCacheHandle()->GetTooltipFont(); //GetFont( GetFontCacheHandle()->fSizeMin() + GetFontCacheHandle()->fStepSize() * 2 ); SetVisible( true ); MakePopup( false ); SetMouseInputEnabled( false ); SetKeyBoardInputEnabled( false ); }
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); }
SwarmopediaTopicButton::SwarmopediaTopicButton( vgui::Panel *pParent, const char *pElementName, SwarmopediaPanel *pSwarmopedia) : vgui::Panel(pParent, pElementName) { m_pSwarmopedia = pSwarmopedia; m_pLabel = new vgui::Label(this, "TopicLabel", ""); m_pLabel->SetContentAlignment(vgui::Label::a_northwest); SetMouseInputEnabled(true); m_pLabel->SetMouseInputEnabled(false); m_hFont = vgui::INVALID_FONT; m_iSectionHeader = 0; m_szArticleTarget[0] = '\0'; m_szListTarget[0] = '\0'; }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseHudChat::StartMessageMode( int iMessageModeType ) { #ifndef _XBOX m_nMessageMode = iMessageModeType; m_pChatInput->ClearEntry(); if ( m_nMessageMode == MM_SAY ) { m_pChatInput->SetPrompt( L"Say :" ); } else { m_pChatInput->SetPrompt( L"Say (TEAM) :" ); } if ( GetChatHistory() ) { GetChatHistory()->SetMouseInputEnabled( true ); GetChatHistory()->SetKeyBoardInputEnabled( false ); GetChatHistory()->SetVerticalScrollbar( true ); GetChatHistory()->ResetAllFades( true ); GetChatHistory()->SetPaintBorderEnabled( true ); GetChatHistory()->SetVisible( true ); } vgui::SETUP_PANEL( this ); SetKeyBoardInputEnabled( true ); SetMouseInputEnabled( true ); m_pChatInput->SetVisible( true ); vgui::surface()->CalculateMouseVisible(); m_pChatInput->RequestFocus(); m_pChatInput->SetPaintBorderEnabled( true ); m_pChatInput->SetMouseInputEnabled( true ); //Place the mouse cursor near the text so people notice it. int x, y, w, h; GetChatHistory()->GetBounds( x, y, w, h ); vgui::input()->SetCursorPos( x + ( w/2), y + (h/2) ); m_flHistoryFadeTime = gpGlobals->curtime + CHAT_HISTORY_FADE_TIME; m_pFilterPanel->SetVisible( false ); engine->ClientCmd_Unrestricted( "gameui_preventescapetoshow\n" ); #endif }
//-------------------------------------------------------------- // Helper that closes the menu //-------------------------------------------------------------- void CBuildMenu::DoClose() { Close(); SetVisible( false ); SetMouseInputEnabled( false ); //bring viewport back up C_HL2MP_Player *pPlayer = C_HL2MP_Player::GetLocalHL2MPPlayer(); if (pPlayer && pPlayer->IsZM()) { //prevent edge cases with roundrestarts while panel is open m_pViewPort->ShowPanel( PANEL_VIEWPORT, true ); } gViewPortInterface->ShowBackGround( false ); }
CDialog_RendertargetSettings::CDialog_RendertargetSettings( Panel *parent ) : CBaseDiag( parent, NULL, "rtsettings" ) //BaseClass( parent, "rtsettings" ) { m_pRTTarget = NULL; SetMouseInputEnabled( true ); SetKeyBoardInputEnabled( true ); m_pText_RTName = new TextEntry( this, "rt_name" ); m_pText_SizeX = new TextEntry( this, "rt_size_x" ); m_pText_SizeY = new TextEntry( this, "rt_size_y" ); m_pList_Flags = new PanelListPanel( this, "rtlist" ); m_pList_Flags->SetNumColumns( 1 ); m_pList_Flags->SetFirstColumnWidth( 0 ); m_pList_Flags->SetVerticalBufferPixels( 0 ); for ( int i = 0; i < iNumVTFFlags; i++ ) { CheckButton *pCBut = new CheckButton( m_pList_Flags, "", pszVTFFlags[i] ); m_pList_Flags->AddItem( NULL, pCBut ); m_hFlag_Buttons.AddToTail( pCBut ); } m_pCBox_ImgFormat = new ComboBox( this, "cbox_format", 20, false ); for ( int i = 0; i < iNumImgFormatNames; i++ ) m_pCBox_ImgFormat->AddItem( pszImgFormatNames[i], NULL ); m_pCBox_SizeMode = new ComboBox( this, "cbox_sizemode", 20, false ); for ( int i = 0; i < iNumRTSizeModes; i++ ) m_pCBox_SizeMode->AddItem( pszRTSizeModes[i], NULL ); m_pCBox_DepthMode = new ComboBox( this, "cbox_depthmode", 20, false ); for ( int i = 0; i < iNumRTDepthModes; i++ ) m_pCBox_DepthMode->AddItem( pszRTDepthModes[i], NULL ); LoadControlSettings( "shadereditorui/vgui/dialog_rendertarget_settings.res" ); SetSizeable( false ); SetTitle( "Rendertarget properties", true ); SetCloseButtonVisible( false ); DoModal(); MoveToCenterOfScreen(); }
void CEditorRoot::PerformLayout() { BaseClass::PerformLayout(); SetZPos(0); int wide,tall; surface()->GetScreenSize(wide, tall); if ( m_bHalfView ) wide /= 2; SetPos(0,0); SetSize(wide,tall); SetMouseInputEnabled(m_bHasInput); SetKeyBoardInputEnabled(m_bHasInput); m_pLabelTitle->SetVisible( !m_bHalfView ); }
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_VGUI_Door_Tooltip::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(true); SetBgColor( Color(16,16,16,192) ); if ( GetDoor() ) { SetAlpha(200); } else { SetAlpha(0); } SetMouseInputEnabled(false); }
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); } }
//----------------------------------------------------------------------------- // Purpose: // Input : *parent - // Output : //----------------------------------------------------------------------------- CMessageCharsPanel::CMessageCharsPanel( vgui::VPANEL parent ) : BaseClass( NULL, "CMessageCharsPanel" ) { SetParent( parent ); SetSize( ScreenWidth(), ScreenHeight() ); SetPos( 0, 0 ); SetVisible( true ); SetCursor( null ); SetKeyBoardInputEnabled( false ); SetMouseInputEnabled( false ); m_hFont = vgui::INVALID_FONT; SetFgColor( Color( 0, 0, 0, 255 ) ); SetPaintBackgroundEnabled( false ); Reset(); vgui::ivgui()->AddTickSignal( GetVPanel(), 100 ); }
VideoPanel::VideoPanel( unsigned int nXPos, unsigned int nYPos, unsigned int nHeight, unsigned int nWidth, vgui::VPANEL pParent ) : BaseClass( NULL, "VideoPanel" ), m_BIKHandle( BIKHANDLE_INVALID ), m_nPlaybackWidth( 0 ), m_nPlaybackHeight( 0 ) { if (pParent == NULL) { SetParent( enginevgui->GetPanel( PANEL_GAMEUIDLL ) ); } else { SetParent( pParent ); } SetVisible( false ); m_czLastFile[0] = '\0'; m_bPlaying = false; m_bRepeat = false; m_bBlackBackground = true; SetKeyBoardInputEnabled( true ); SetMouseInputEnabled( false ); SetProportional( false ); SetVisible( true ); SetPaintBackgroundEnabled( false ); SetPaintBorderEnabled( false ); SetAutoDelete( true ); // Set us up SetTall( nHeight ); SetWide( nWidth ); SetPos( nXPos, nYPos ); SetScheme(vgui::scheme()->LoadSchemeFromFile( "resource/VideoPanelScheme.res", "VideoPanelScheme")); LoadControlSettings("resource/UI/VideoPanel.res"); }
void CASW_VGUI_Stylin_Cam::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(false); SetBgColor( Color(0,0,0,0) ); SetAlpha(255); SetMouseInputEnabled(false); m_pCameraImage->SetAlpha( 0 ); m_pCameraImage->SetImage( "swarm/Computer/ComputerCamera" ); m_pCommanderImage->SetAlpha( 0 ); m_pCommanderImage->SetImage( "briefing/face_pilot" ); m_pCommanderFlash->SetAlpha( 255 ); m_pCommanderFlash->SetImage( "white" ); m_bFadingInCommanderFace = false; m_bFadingOutCommanderFace = false; }