//----------------------------------------------------------------------------- // Purpose: // Input : *parent - //----------------------------------------------------------------------------- CDistanceMeter::CDistanceMeter( const char *pElementName ) : CHudElement( pElementName ), BaseClass( NULL, "CDistanceMeter" ) { Panel *pParent = g_pClientMode->GetViewport(); SetParent( pParent ); SetVisible( false ); SetCursor( null ); SetFgColor( Color( 0, 0, 0, 255 ) ); SetPaintBackgroundEnabled( false ); m_hFont = 0; }
//----------------------------------------------------------------------------- // Purpose: // Input : *parent - // *panelName - //----------------------------------------------------------------------------- CBaseHudChatLine::CBaseHudChatLine( vgui::Panel *parent, const char *panelName ) : vgui::RichText( parent, panelName ) { m_hFont = m_hFontMarlett = 0; m_flExpireTime = 0.0f; m_flStartTime = 0.0f; m_iNameLength = 0; m_text = NULL; SetPaintBackgroundEnabled( true ); SetVerticalScrollbar( false ); }
// // Name: CHudDomScore // Author: Hekar Khani // Description: HUD panel for displaying player scores // Notes: // CHudDomScore::CHudDomScore( const char *pElementName ) : CModHudElement( pElementName, HUDELEM_DOMSCORE ), BaseClass( NULL, "HudDomScore" ) { // Set our parent window SetParent( g_pClientMode->GetViewport() ); vgui::HScheme scheme = vgui::scheme()->GetScheme( "ClientScheme" ); m_hTextFont = vgui::scheme()->GetIScheme( scheme )->GetFont( "SFHUDLarge" ); SetPaintBackgroundEnabled( true ); SetHiddenBits( HIDEHUD_PLAYERDEAD | HIDEHUD_BUILDPHASE ); }
//================================================================================================================ // LARGE STATUS PANEL. //================================================================================================================ // Purpose: //----------------------------------------------------------------------------- CHudOrderList::CHudOrderList( const char *pElementName ) : CHudElement( pElementName ), vgui::Panel( NULL, "HudOrderList" ) { vgui::Panel *pParent = g_pClientMode->GetViewport(); SetParent( pParent ); SetPaintBackgroundEnabled( false ); for (int i = 0; i < MAX_HUD_ORDERS; i++) { m_pOrderPanels[i] = NULL; m_pOrderLabels[i] = NULL; } }
//----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- CBitmapButton::CBitmapButton( vgui::Panel *pParent, const char *pName, const char *pText ) : BaseClass( pParent, pName, pText ) { SetPaintBackgroundEnabled( false ); for ( int i = 0; i < BUTTON_STATE_COUNT; ++i ) { m_bImageLoaded[i] = false; } //JL m_fX0 = -1; m_fY0 = -1; m_fX1 = -1; m_fY1 = -1; }
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 CASW_VGUI_Computer_Menu::ASWInit() { SetPaintBackgroundType(0); SetPaintBackgroundEnabled(false); SetBgColor( Color(0,0,0,0) ); SetAlpha(255); SetIcons(); m_pBlackBar[0]->SetImage("swarm/HUD/ASWHUDBlackBar"); m_pBlackBar[1]->SetImage("swarm/HUD/ASWHUDBlackBar"); m_pAccessDeniedLabel->SetAlpha(0); m_pInsufficientRightsLabel->SetAlpha(0); }
//----------------------------------------------------------------------------- // Purpose: hud scheme settings //----------------------------------------------------------------------------- void CHudMenu::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundEnabled( false ); // set our size int screenWide, screenTall; int x, y; GetPos(x, y); GetHudSize(screenWide, screenTall); SetBounds(0, y, screenWide, screenTall - y); ProcessText(); }
void CCommanderStatusPanel::InternalClear( void ) { m_Type = TYPE_UNKNOWN; m_szText[ 0 ] = 0; m_nTitlePos = -1; m_flCurrentAlpha = 0.0f; m_flGoalAlpha = 0.0f; m_bShowTechnology = false; m_pTechnology = NULL; SetVisible( false ); SetPaintBackgroundEnabled( false ); SetPaintBorderEnabled( false ); }
void Button_Panel::Initialize() { BaseClass::Initialize(); #ifdef MFS vgui::HScheme Scheme = vgui::scheme()->LoadSchemeFromFile("resource/schemepanel.res", "SchemePanel"); #else vgui::HScheme Scheme = vgui::scheme()->LoadSchemeFromFile("resource2/schemepanel.res", "SchemePanel"); #endif SetScheme(Scheme); SetProportional(false); SetPaintBorderEnabled(false); SetPaintBackgroundEnabled(false); SetEnabled(true); SetVisible(false); }
//----------------------------------------------------------------------------- // Purpose: // Input : *parent - //----------------------------------------------------------------------------- CDownloadSliderPanel::CDownloadSliderPanel( vgui::VPANEL parent ) : BaseClass( NULL , "CDownloadSliderPanel" ) { SetParent( parent ); SetSize( ScreenWidth(), ScreenHeight() ); SetPos( 0, 0 ); SetVisible( false ); SetCursor( null ); SetFgColor( Color( 0, 0, 0, 255 ) ); SetPaintBackgroundEnabled( false ); scr_downloading = (ConVar *)cvar->FindVar( "scr_downloading" ); assert( scr_downloading ); vgui::ivgui()->AddTickSignal( GetVPanel(), 250 ); }
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; }
//----------------------------------------------------------------------------- // C_SDKRootPanel implementation. //----------------------------------------------------------------------------- C_SDKRootPanel::C_SDKRootPanel( vgui::VPANEL parent ) : BaseClass( NULL, "SDK Root Panel" ) { SetParent( parent ); SetPaintEnabled( false ); SetPaintBorderEnabled( false ); SetPaintBackgroundEnabled( false ); // This panel does post child painting SetPostChildPaintEnabled( true ); // Make it screen sized SetBounds( 0, 0, ScreenWidth(), ScreenHeight() ); // Ask for OnTick messages vgui::ivgui()->AddTickSignal( GetVPanel() ); }
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_Splash::ASWInit() { m_pLogoImage->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pLogoImage, "Alpha", 255, 0.3f, 1.7f, vgui::AnimationController::INTERPOLATOR_LINEAR); m_pLogoGlitchImage->SetAlpha(0); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(false); SetBgColor( Color(0,0,0,0) ); SetAlpha(255); m_pSloganLabel->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pSloganLabel, "Alpha", 255, 0.8f, 1.7f, vgui::AnimationController::INTERPOLATOR_LINEAR); m_pSynTekLabel->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pSynTekLabel, "Alpha", 255, 0.3f, 1.7f, vgui::AnimationController::INTERPOLATOR_LINEAR); }
void CASW_VGUI_Computer_Frame::ASWInit() { SetPaintBackgroundType(0); SetPaintBackgroundEnabled(true); SetBgColor( Color(0,0,0,255) ); m_pBackdropImage->SetAlpha(0); vgui::GetAnimationController()->RunAnimationCommand(m_pBackdropImage, "Alpha", 255, 0, 2.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); SetAlpha(255); if (IsPDA()) { m_pSplash = NULL; } else { m_pSplash = new CASW_VGUI_Computer_Splash(this, "ComputerSplash", m_pHackComputer); m_pSplash->ASWInit(); m_pSplash->SetPos(0,0); m_pCurrentPanel = m_pSplash; } m_iScanHeight = 0; m_pMenuPanel = new CASW_VGUI_Computer_Menu(this, "ComputerMenu", m_pHackComputer); m_pMenuPanel->ASWInit(); m_pMenuPanel->SetPos(0,0); if (IsPDA()) { // hm, not true.. we want the first panel to be the mail one m_pCurrentPanel = m_pMenuPanel; } if (GetControllerFocus()) { GetControllerFocus()->AddToFocusList(m_pLogoffLabel); GetControllerFocus()->SetFocusPanel(m_pLogoffLabel); } vgui::GetAnimationController()->RunAnimationCommand(m_pLogoffLabel, "Alpha", 255, 0.0f, 1.0f, vgui::AnimationController::INTERPOLATOR_LINEAR); }
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); } }
//----------------------------------------------------------------------------- // CASWSelectOverlayPulse // // creates a highlight pulse over the panel of an offhand item that has just been used // //----------------------------------------------------------------------------- CASWSelectOverlayPulse::CASWSelectOverlayPulse( vgui::Panel* pParent ) { SetPaintBackgroundEnabled( false ); m_pParent = NULL; m_bStarted = false; m_fScale = 1.1; if ( pParent ) { m_pParent = pParent; SetParent( pParent->GetParent() ); Initialize(); } else { MarkForDeletion(); SetVisible( false ); } }
//----------------------------------------------------------------------------- // 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 ); }
void CASWHud3DMarineNames::Reset() { SetPaintBackgroundEnabled(false); m_hHealthQueuedMarine = NULL; m_hHealthMarine = NULL; m_bHealthQueuedMarine = false; m_fHealthAlpha = 0; for( int i = 0; i < ASW_MAX_PLAYERS; i++ ) { m_flLastTalkingTime[i] = 0; } m_3DSpeakingList.ClearAll(); m_flLastReloadProgress = 0; m_flLastNextAttack = 0; m_flLastFastReloadStart = 0; m_flLastFastReloadEnd = 0; }
void CIOSUpdatePanel::ApplySchemeSettings( IScheme *pScheme ) { m_pScheme = pScheme; BaseClass::ApplySchemeSettings( pScheme ); SetTitle("IOS Updater", false); SetProportional(false); SetSizeable(false); SetBounds(0, 0, PANEL_WIDTH, PANEL_HEIGHT); //SetBgColor(Color(0, 0, 0, 255)); SetPaintBackgroundEnabled(true); SetCloseButtonVisible(false); MoveToCenterOfScreen(); m_pContent->SetBounds(PADDING, PADDING + TOP_PADDING, GetWide() - 2 * PADDING, GetTall() - 2 * PADDING - TOP_PADDING); m_pUpdateButton->SetBounds(m_pContent->GetWide() / 2 - UPDATE_BUTTON_WIDTH / 2, m_pContent->GetTall() - UPDATE_BUTTON_HEIGHT - BUTTON_MARGIN - BUTTON_HEIGHT, UPDATE_BUTTON_WIDTH, UPDATE_BUTTON_HEIGHT); m_pUpdateButton->SetContentAlignment(Label::a_center); m_pCloseButton->SetBounds(m_pContent->GetWide() / 2 - BUTTON_WIDTH / 2, m_pContent->GetTall() - BUTTON_HEIGHT, BUTTON_WIDTH, BUTTON_HEIGHT); m_pCloseButton->SetContentAlignment(Label::a_center); m_pInfoText->SetBounds(PADDING, 3 * PADDING, m_pContent->GetWide() - 2 * PADDING, INFO_HEIGHT); m_pInfoText->SetFont(pScheme->GetFont("DefaultBig")); m_pInfoText->SetContentAlignment(Label::a_center); m_pInfoText->SetFgColor(Color(255, 255, 255, 255)); m_pExtraInfoText->SetBounds(PADDING, 3 * PADDING + INFO_HEIGHT + PADDING, m_pContent->GetWide() - 2 * PADDING, INFO_HEIGHT); m_pExtraInfoText->SetFont(pScheme->GetFont("DefaultBig")); m_pExtraInfoText->SetContentAlignment(Label::a_center); m_pExtraInfoText->SetFgColor(Color(255, 255, 255, 255)); m_pExtraInfoText2->SetBounds(PADDING, 3 * PADDING + 2 * (INFO_HEIGHT + PADDING), m_pContent->GetWide() - 2 * PADDING, INFO_HEIGHT); m_pExtraInfoText2->SetFont(pScheme->GetFont("DefaultBig")); m_pExtraInfoText2->SetContentAlignment(Label::a_center); m_pExtraInfoText2->SetFgColor(Color(255, 255, 255, 255)); m_pProgressBar->SetBounds(m_pContent->GetWide() / 2 - PROGRESSBAR_WIDTH / 2, 3 * PADDING + 3 * (INFO_HEIGHT + PADDING), PROGRESSBAR_WIDTH, PROGRESSBAR_HEIGHT); m_pChangelog->SetBounds(m_pContent->GetWide() / 2 - CHANGELOG_WIDTH / 2, 4 * PADDING + 3 * (INFO_HEIGHT + PADDING) + PROGRESSBAR_HEIGHT, CHANGELOG_WIDTH, CHANGELOG_HEIGHT); }
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; }
//----------------------------------------------------------------------------- // Purpose: Instances the overlay object // Input : *parent - //----------------------------------------------------------------------------- CDebugOverlay::CDebugOverlay( vgui::VPANEL parent ) : BaseClass( NULL, "CDebugOverlay" ) { int w, h; vgui::surface()->GetScreenSize( w, h ); SetParent( parent ); SetSize( w, h ); SetPos( 0, 0 ); SetVisible( false ); SetCursor( null ); m_hFont = 0; SetFgColor( Color( 0, 0, 0, 0 ) ); SetPaintBackgroundEnabled( false ); // set the scheme before any child control is created vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFileEx( enginevgui->GetPanel( PANEL_CLIENTDLL_TOOLS ), "resource/ClientScheme.res", "Client"); SetScheme( scheme ); vgui::ivgui()->AddTickSignal( GetVPanel(), 250 ); }
MainMenu::MainMenu(vgui::Panel* parent) : BaseClass(NULL, "MainMenu") { vgui::HScheme Scheme = vgui::scheme()->LoadSchemeFromFile("resource2/schememainmenu.res", "SchemeMainMenu"); SetScheme(Scheme); SetProportional(false); SetPaintBorderEnabled(false); SetPaintBackgroundEnabled(false); SetDeleteSelfOnClose(true); SetSizeable(false); SetMoveable(false); SetCloseButtonVisible(false); SetMenuButtonVisible(false); Activate(); m_bFocused = true; m_logoLeft = GameUI2().GetLocalizedString("#GameUI2_LogoLeft"); m_logoRight = GameUI2().GetLocalizedString("#GameUI2_LogoRight"); CreateMenu("resource2/mainmenu.res"); }
void CEditorRoot::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundEnabled(true); SetPaintBorderEnabled(false); SetPaintEnabled(true); SetCloseButtonVisible(false); SetSizeable(false); SetMoveable(false); InitColors(); SetTitle( "", true ); SetTitleBarVisible( false ); m_pLabelTitle->SetText( GetEditorTitle() ); m_pLabelTitle->SetFont( pScheme->GetFont( "UiBold", false ) ); SetPaintBackgroundType( 0 ); OnShaderNameChanged(); GenerateFonts(pScheme); }
CEntityPanel::CEntityPanel( vgui::Panel *pParent, const char *panelName ) : BaseClass( pParent, panelName ) { SetPaintBackgroundEnabled( false ); m_pBaseEntity = NULL; // FIXME: ComputeParent is yucky... can we be rid of it? if (!pParent) { ComputeParent(); } m_szMouseOverText[ 0 ] = 0; // Send mouse inputs (but not cursorenter/exit for now) up to parent SetReflectMouse( true ); m_bShowInNormal = false; m_flScale = 0; m_OffsetX = 0; m_OffsetY = 0; }
void CBaseHudChatInputLine::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); // FIXME: Outline vgui::HFont hFont = pScheme->GetFont( "Trebuchet18" ); m_pPrompt->SetFont( hFont ); m_pInput->SetFont( hFont ); SetPaintBackgroundEnabled( false ); m_pPrompt->SetPaintBackgroundEnabled( false ); m_pPrompt->SetContentAlignment( vgui::Label::a_west ); m_pPrompt->SetTextInset( 2, 0 ); #ifdef HL1_CLIENT_DLL m_pInput->SetBgColor( Color( 255, 255, 255, 0 ) ); #else m_pInput->SetFgColor( GetFgColor() ); m_pInput->SetBgColor( GetBgColor() ); #endif }
void CASW_VGUI_Queen_Health_Panel::ApplySchemeSettings(vgui::IScheme *pScheme) { BaseClass::ApplySchemeSettings(pScheme); SetPaintBackgroundType(0); SetPaintBackgroundEnabled(false); SetBgColor( Color(0,0,0,0) ); SetAlpha(255); SetMouseInputEnabled(false); m_pBackdrop->SetPaintBackgroundType(0); m_pBackdrop->SetPaintBackgroundEnabled(true); m_pBackdrop->SetBgColor(Color(0, 0, 0, 64)); m_pBackdrop->SetVisible(false); for (int i=0;i<ASW_QUEEN_HEALTH_BARS;i++) { m_pHealthBar[i]->SetPaintBackgroundType(0); m_pHealthBar[i]->SetPaintBackgroundEnabled(true); m_pHealthBar[i]->SetBgColor(Color(255, 32, 0, 64)); m_pHealthBar[i]->SetVisible(false); } }
//----------------------------------------------------------------------------- // Constructor //----------------------------------------------------------------------------- CToolUI::CToolUI( vgui::Panel *pParent, const char *panelName, CBaseToolSystem *pBaseToolSystem ) : BaseClass( pParent, panelName ), m_pClientArea( 0 ), m_pBaseToolSystem( pBaseToolSystem ) { SetPaintEnabled(false); SetPaintBackgroundEnabled(false); SetPaintBorderEnabled(false); int w, h; pParent->GetSize( w, h ); SetBounds( 0, 0, w, h ); m_pMenuBar = m_pBaseToolSystem->CreateMenuBar( m_pBaseToolSystem ); m_pMenuBar->SetParent( this ); m_pMenuBar->SetSize( w, MENU_HEIGHT ); // This can be NULL if no status bar should be included m_pStatusBar = m_pBaseToolSystem->CreateStatusBar( this ); m_pStatusBar->SetParent( this ); m_pClientArea = new vgui::Panel( this, "ClientArea" ); m_pClientArea->SetMouseInputEnabled( false ); m_pClientArea->SetCursor( vgui::dc_none ); m_pClientArea->SetBounds( 0, MENU_HEIGHT, w, h - MENU_HEIGHT ); }