コード例 #1
0
void CNB_Select_Level_Panel::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );
	
	LoadControlSettings( "resource/ui/nb_sdk_select_level_panel.res" );

	m_pHorizList->m_pBackgroundImage->SetImage( "briefing/select_marine_list_bg" );
	m_pHorizList->m_pForegroundImage->SetImage( "briefing/horiz_list_fg" );
}
コード例 #2
0
CSheet_Multiply::CSheet_Multiply(CBaseNode *pNode, CNodeView *view, KeyValues *data, Panel *parent )
	: BaseClass( pNode, view, data, parent )
{
	SetParent( parent );

	m_pCheck_MatrixAsRotation = new CheckButton( this, "rotationmatrix", "Matrix rotation only" );

	LoadControlSettings( "shadereditorui/vgui/sheet_multiply.res" );
}
コード例 #3
0
CSheet_Std_PSpecLight::CSheet_Std_PSpecLight(CBaseNode *pNode, CNodeView *view, KeyValues *data, Panel *parent )
	: BaseClass( pNode, view, data, parent )
{
	SetParent( parent );

	m_pCheck_AOTerm = new CheckButton(this, "AO","");

	LoadControlSettings( "shadereditorui/vgui/sheet_std_pspeclight.res" );
}
コード例 #4
0
void CTilegenLayoutSystemPage::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );

	LoadControlSettings( "tilegen/TilegenLayoutSystemPage.res", "GAME" );
	bool bItemSelected = ( m_szFilename[0] != '\0' );
	m_pReloadMissionButton->SetVisible( bItemSelected );
	m_pSaveButton->SetVisible( bItemSelected );
	m_pGenerateButton->SetVisible( bItemSelected );
}
コード例 #5
0
ファイル: stats_report.cpp プロジェクト: plaYer2k/client
void StatsReport::ApplySchemeSettings(vgui::IScheme *pScheme)
{
	LoadControlSettings( "resource/UI/StatsReport.res" );

	m_pObjectiveMap->m_pMapImage->SetAlpha( 90 );

	BaseClass::ApplySchemeSettings(pScheme);

	SetPlayerNames();
}
コード例 #6
0
ファイル: hud_basechat.cpp プロジェクト: Epic-xx/impending
void CHudChatFilterPanel::ApplySchemeSettings(vgui::IScheme *pScheme)
{
	LoadControlSettings( "resource/UI/ChatFilters.res" );

	BaseClass::ApplySchemeSettings( pScheme );

	Color cColor = pScheme->GetColor( "DullWhite", GetBgColor() );
	SetBgColor( Color ( cColor.r(), cColor.g(), cColor.b(), CHAT_HISTORY_ALPHA ) );

	SetFgColor( pScheme->GetColor( "Blank", GetFgColor() ) );
}
コード例 #7
0
CSheet_Condition::CSheet_Condition(CBaseNode *pNode, CNodeView *view, KeyValues *data, Panel *parent )
	: BaseClass( pNode, view, data, parent )
{
	SetParent( parent );

	m_pCBox_Condition = new ComboBox( this, "cbox_condition", 6, false );
	for ( int i = 0; i < 5; i++ )
		m_pCBox_Condition->AddItem( GetConditionCodeString( i ), NULL );

	LoadControlSettings( "shadereditorui/vgui/sheet_condition.res" );
}
コード例 #8
0
void CNB_Weapon_Unlocked::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );
	
	LoadControlSettings( "resource/ui/nb_weapon_unlocked.res" );

	SetAlpha( 0 );
	vgui::GetAnimationController()->RunAnimationCommand( this, "alpha", 255, 0, 0.5f, vgui::AnimationController::INTERPOLATOR_LINEAR );

	CLocalPlayerFilter filter;
	C_BaseEntity::EmitSound( filter, -1 /*SOUND_FROM_LOCAL_PLAYER*/, "ASWInterface.SelectWeapon" );
}
コード例 #9
0
CHapticsMovementPage::CHapticsMovementPage(vgui::PropertySheet *parent,KeyValues *pageData) :
BaseClass(parent,pageData)
{
	parent->AddPage(this,GetTabTitle());
	//CVarSliderCombo *ControlBox = new CVarSliderCombo(this, "CBoxSize", "#HapControlBoxSize", "hap_cb_left_start", "#HapPlayer", 300, 0, 300, 0, 12, 12, 0);
	//ControlBox->AddConvarMimic("hap_cb_bottom_start");
	//ControlBox->AddConvarMimic("hap_cb_far_start");
	//ControlBox->AddConvarMimic("hap_cb_right_start");
	//ControlBox->AddConvarMimic("hap_cb_top_start");
	//ControlBox->AddConvarMimic("hap_cb_near_start");

	
	
	//CVarSlider *VehicleBox = ControlBox->AddSlider("hap_cb_left_start", "#HapVehicle", 200);
	//VehicleBox->AddConvarMimic("hap_cbvehicle_bottom_start");
	//VehicleBox->AddConvarMimic("hap_cbvehicle_far_start");
	//VehicleBox->AddConvarMimic("hap_cbvehicle_right_start");
	//VehicleBox->AddConvarMimic("hap_cbvehicle_top_start");
	//VehicleBox->AddConvarMimic("hap_cbvehicle_near_start");	

	CVarSlider *pAimYaw    = new CVarSlider(this, "YAWAIM", NULL, "hap_yawsensitivity_posctrl", 120, 0, 360, 0, 360, 36, 0);
	CVarSlider *pAimPitch  = new CVarSlider(this, "PITAIM", NULL, "hap_pitchsensitivity_posctrl", 120, 0, 180, 0, 180, 18, 0);  

	CVarSlider *pTurnYaw   = new CVarSlider(this, "YAWTURN", NULL, "hap_yawsensitivity_velctrl", 2, 0, 4, 0, 16, 16, 0);
	CVarSlider *pTurnPitch = new CVarSlider(this, "PITTURN", NULL, "hap_pitchsensitivity_velctrl", 1, 0, 4, 0, 16, 16, 0);  
	
	CVarSliderCheck *pMove = new CVarSliderCheck(this, "MOVE", "#HapMovementEnabled", "hap_var_avatar_movement_mode", "hap_forwardsensitivity",2,1,0,10,1,2,0,10,10,0); 
	pMove->SetAutoSizeLabels(true);
	
	CVarSlider *pCursorSensitivity = new CVarSlider(this, "CURSORSENS", NULL, "hap_cursor_sensitivity", 2, 0, 10, 0, 10, 10, 0);

	//AddCVarControl( (vgui::Panel*) ControlBox );
	AddCVarControl( (vgui::Panel*) pAimYaw );
	AddCVarControl( (vgui::Panel*) pAimPitch );
	AddCVarControl( (vgui::Panel*) pTurnYaw );
	AddCVarControl( (vgui::Panel*) pTurnPitch );
	AddCVarControl( (vgui::Panel*) pMove );
	AddCVarControl( (vgui::Panel*) pCursorSensitivity );

	// check marks for reversals
	m_pReverseYaw = new vgui::CheckButton( this, "YAWREVERSE", "#HapReverse");
	m_pReversePitch = new vgui::CheckButton( this, "PITCHREVERSE", "#HapReverseUp");

	LoadControlSettings("resource/UI/FalconMovement.res");
	//resize everything
	for(int i = 0;i!=m_controls.Count();i++)
	{
		// currently, this page will only use slider CVControls.
		((CVarSlider *)m_controls[i])->SetSize(m_controls[i]->GetWide(), m_controls[i]->GetTall());
	}
	//SetVisible(false);first page.
}
コード例 #10
0
void CNB_Lobby_Row_Small::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::BaseClass::ApplySchemeSettings( pScheme );
	
	LoadControlSettings( "resource/ui/nb_lobby_row_small.res" );

	for ( int i = 0;i < ASW_NUM_INVENTORY_SLOTS; i++ )
	{
		m_szLastWeaponImage[i][0] = 0;
	}
	m_szLastPortraitImage[ 0 ] = 0;
	m_lastSteamID.Set( 0, k_EUniverseInvalid, k_EAccountTypeInvalid );
}
コード例 #11
0
//
//	Name: CCreditPanel
//	Author: Hekar Khani
//	Description: Pretty straight forward panel for just holding credits
//	Notes: 
//
CCreditPanel::CCreditPanel (vgui::VPANEL parent) :
	BaseClass( NULL, "credits" )
{	
	SetParent( parent );
	vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFile( "resource/SourceScheme.res", "SourceScheme" );
	SetScheme( scheme );
	LoadControlSettings( "resource/ui/CreditsPanel.res" );

	SetVisible( false );
	SetSizeable( false );

	SetMaximizeButtonVisible( false );
	SetMinimizeButtonVisible( false );
}
コード例 #12
0
CSheet_PSOutput::CSheet_PSOutput(CBaseNode *pNode, CNodeView *view, KeyValues *data, Panel *parent )
	: BaseClass( pNode, view, data, parent )
{
	m_pSlider_col = new Slider(this, "col" );
	m_pSlider_col->SetRange( 1, 4 );
	m_pSlider_col->SetNumTicks( 3 );
	m_pSlider_col->SetThumbWidth( SHEET_SLIDER_THUMB_SIZE );

	m_pCheck_Depth = new CheckButton(this, "depth","");

	m_pLabel_Info_Num_Colors = new Label( this, "info_col", "" );

	LoadControlSettings( "shadereditorui/vgui/sheet_psoutput.res" );
}
コード例 #13
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CBaseActionZoomDialog::Init( void )
{
	LoadControlSettings( "resource\\BaseActionZoomDialog.res" );

	BaseClass::Init();

	m_pFinalFOV->SetText( va( "%f", GetAction()->m_flFinalFOV ) );
	m_pOutRate->SetText( va( "%f", GetAction()->m_flFOVRateOut ) );
	m_pInRate->SetText( va( "%f", GetAction()->m_flFOVRateIn ) );
	m_pHoldTime->SetText( va( "%f", GetAction()->m_flHoldTime ) );

	m_pSpline->SetSelected( GetAction()->m_bSpline );
	m_pStayout->SetSelected( GetAction()->m_bStayout );
}
コード例 #14
0
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
CDoDHudHealth::CDoDHudHealth( vgui::Panel *parent, const char *name ) : vgui::EditablePanel( parent, name )
{
	SetProportional( true );

	m_pHealthBar = new CDoDHudHealthBar( this, "HealthBar" );
	m_pClassImageBG = new vgui::ImagePanel( this, "HealthClassImageBG" );
	m_pClassImage = new vgui::ImagePanel( this, "HealthClassImage" );
	
	m_nPrevClass = PLAYERCLASS_UNDEFINED;
	m_nPrevTeam = TEAM_INVALID;

	// load control settings...
	LoadControlSettings( "resource/UI/HudPlayerStatusHealth.res" );
}
コード例 #15
0
//
//	Name: CGUICommunity
//	Author: Hekar Khani
//	Description: Community portal to news, etc
//	Notes: 
//
CGUICommunity::CGUICommunity( vgui::VPANEL parent ) :
	BaseClass( NULL, "GUICommunity" )
{	
	SetParent( parent );
	vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFile( "resource/sourcescheme.res", "sourcescheme" );
	SetScheme( scheme );
	LoadControlSettings( "resource/ui/Community.res" );

	SetVisible( false );
	SetTitle( "#lf_community_title", true );
	SetSizeable( false );

	SetMaximizeButtonVisible( false );
	SetMinimizeButtonVisible( false );
}
コード例 #16
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CControlPointProgressBar::ApplySchemeSettings( IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );

	LoadControlSettings( "resource/UI/ControlPointProgressBar.res" );

	m_pBar = dynamic_cast<vgui::CircularProgressBar *>( FindChildByName("ProgressBar") );
	m_pBarText = dynamic_cast<vgui::Label *>( FindChildByName("ProgressText") );
	m_pTeardrop = dynamic_cast<CIconPanel *>( FindChildByName("Teardrop") );
	m_pTeardropSide = dynamic_cast<CIconPanel *>( FindChildByName("TeardropSide") );
	m_pBlocked = dynamic_cast<CIconPanel *>( FindChildByName("Blocked") );
	m_iOrgHeight = GetTall();

	m_iMidGroupIndex = gHUD.LookupRenderGroupIndexByName( "mid" );
}
コード例 #17
0
CHapticsForcesPage::CHapticsForcesPage(vgui::PropertySheet *parent, KeyValues *pageData) :
BaseClass(parent,NULL)
{
	parent->AddPage(this,GetTabTitle());

	CVarSlider *ForceScale = new CVarSlider(this, "FORCESCALE", "#HapForceScale", "hap_recoil_scale", 0.3, 0, 2, 0, 40, 40, 0);

	CVarSliderCombo *WeaponScale = new CVarSliderCombo(this, "WEAPONFORCESCALE", "#HapWeaponRecoil", "hap_weapon_scale_357", "#HL2_357Handgun", 2.5, 0, 4, 0, 40, 40, 0);

	// used for weapon name fixing.
	char temp[80];
	WeaponScale->AddSlider("hap_weapon_scale_ar2", WeaponNameFixer("#HL2_Pulse_Rifle",temp,sizeof(temp)), 0.9);
	WeaponScale->AddSlider("hap_weapon_scale_stunstick", "STUNSTICK", 1.0);
	WeaponScale->AddSlider("hap_weapon_scale_crossbow", "#HL2_Crossbow", 1.0);
	WeaponScale->AddSlider("hap_weapon_scale_crowbar", "#HL2_Crowbar", 1.0);
	WeaponScale->AddSlider("hap_weapon_scale_physcannon", WeaponNameFixer("#HL2_GravityGun",temp,sizeof(temp)), 0.8);
	WeaponScale->AddSlider("hap_weapon_scale_pistol", "#HL2_Pistol", 0.5);
	WeaponScale->AddSlider("hap_weapon_scale_shotgun", "#HL2_Shotgun", 2.5);
	WeaponScale->AddSlider("hap_weapon_scale_machinegun", WeaponNameFixer("#HL2_SMG1",temp,sizeof(temp)), 0.5);

	CVarSlider *DamageForces = new CVarSlider(this, "DAMAGEFORCES", "#HapDamageForces", "hap_damage_scale", 0.5, 0, 4, 0, 40, 40, 0);

	CVarSliderCombo *CarryScale = new CVarSliderCombo(this, "CARRYSCALE", "#HapObjectCarryWeight", "hap_sv_carry_player_scale", "#HapPlayer", 2.0, 0, 4, 0, 40, 40, 0);
	CarryScale->AddSlider("hap_sv_carry_physcannon_scale", WeaponNameFixer("#HL2_GravityGun",temp,sizeof(temp)), 0.5);

	CVarSlider *VehicleForces = new CVarSlider(this, "VEHICLEFORCES", "#HapVehicleForces", "hap_vehicle_force_scale", 1.0, 0, 4, 0, 40, 40, 0);
	
	//CVarSliderCombo *ControlBoxStiffness = new CVarSliderCombo(this, "CONTOLLSTIFF", "#HapControlStiffness", "hap_cb_springk", "#HapPlayer", 300, 0, 300, 0, 30, 30, 0);
	//ControlBoxStiffness->AddSlider("hap_cbvehicle_springk", "#HapVehicle", 250);
	//CVarSlider *AvatarForces  = new CVarSlider(this, "AVATARFORCES", "#HapAvatarForces", "hap_avatar_scale", 1.0, 0.0, 5.0, 0, 40, 40, 0);
	AddCVarControl(ForceScale);
	AddCVarControl(WeaponScale);
	AddCVarControl(DamageForces);
	AddCVarControl(CarryScale);
	AddCVarControl(VehicleForces);
	//AddCVarControl(AvatarForces);
	//AddCVarControl(ControlBoxStiffness);

	LoadControlSettings("resource/UI/FalconForces.res");

	//resize everything
	for(int i = 0;i!=m_controls.Count();i++)
	{
		// currently, this page will only use slider CVControls.
		((CVarSlider *)m_controls[i])->SetSize(m_controls[i]->GetWide(), m_controls[i]->GetTall());
	}
	SetVisible(false);
};
コード例 #18
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CTFStatPanel::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );

	LoadControlSettings( "resource/UI/StatPanel_Base.res" );

	vgui::Panel *pStatBox = FindChildByName("StatBox");
	if ( pStatBox )
	{
		// Dirty hack: Make the statbox update now, and then change its bgColor.
		// When it then gets ApplySchemeSetting called shortly after this, it doesn't
		// reapply the scheme because its dirty-scheme flag has been removed.
		pStatBox->ApplySchemeSettings( pScheme );
		pStatBox->SetBgColor( GetSchemeColor("TransparentLightBlack", pScheme) );
	}
}
コード例 #19
0
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
CDODDeathStatsPanel::CDODDeathStatsPanel( const char *pElementName )
: EditablePanel( NULL, "DeathStats" ), CHudElement( pElementName )
{
	vgui::Panel *pParent = g_pClientMode->GetViewport();
	SetParent( pParent );
	SetVisible( false );
	SetAlpha( 0 );
	SetScheme( "ClientScheme" );

	m_pAttackerHistoryLabel = new vgui::Label( this, "AttackerDmgLabel", "..." );
	m_pSummaryLabel = new vgui::Label( this, "LifeSummaryLabel", "..." );

	memset( &m_DeathRecord, 0, sizeof(m_DeathRecord) );

	LoadControlSettings("Resource/UI/DeathStats.res");	
}
コード例 #20
0
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();
}
コード例 #21
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CBaseActionSkipAheadDialog::Init( void )
{
	LoadControlSettings( "resource\\BaseActionSkipAheadDialog.res" );

	BaseClass::Init();

	if ( GetAction()->m_bUsingSkipTick )
	{
		m_pSkipType->SetText( "TimeUseTick" );
		m_pSkip->SetText( va( "%i", GetAction()->m_nSkipToTick ) );
	}
	else
	{
		m_pSkipType->SetText( "TimeUseClock" );
		m_pSkip->SetText( va( "%.3f", GetAction()->m_flSkipToTime ) );
	}
}
コード例 #22
0
void CNB_Horiz_List::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );
	
	LoadControlSettings( "resource/ui/nb_horiz_list.res" );

	color32 regular;
	regular.r = 224;
	regular.g = 224;
	regular.b = 224;
	regular.a = 224;

	color32 white;
	white.r = 255;
	white.g = 255;
	white.b = 255;
	white.a = 255;

	color32 dark;
	dark.r = 128;
	dark.g = 128;
	dark.b = 128;
	dark.a = 128;

	m_pLeftArrowButton->SetImage( CBitmapButton::BUTTON_ENABLED, "vgui/arrow_left", regular );
	m_pLeftArrowButton->SetImage( CBitmapButton::BUTTON_ENABLED_MOUSE_OVER, "vgui/arrow_left", white );
	m_pLeftArrowButton->SetImage( CBitmapButton::BUTTON_PRESSED, "vgui/arrow_left", regular );
	m_pLeftArrowButton->SetImage( CBitmapButton::BUTTON_DISABLED, "vgui/arrow_left", dark );

	m_pRightArrowButton->SetImage( CBitmapButton::BUTTON_ENABLED, "vgui/arrow_right", regular );
	m_pRightArrowButton->SetImage( CBitmapButton::BUTTON_ENABLED_MOUSE_OVER, "vgui/arrow_right", white );
	m_pRightArrowButton->SetImage( CBitmapButton::BUTTON_PRESSED, "vgui/arrow_right", regular );
	m_pRightArrowButton->SetImage( CBitmapButton::BUTTON_DISABLED, "vgui/arrow_right", dark );

	m_pHorizScrollBar->UseImages( "scroll_up", "scroll_down", "scroll_line", "scroll_box" );

	m_bInitialPlacement = true;

	m_pLeftArrowButton->SetVisible( m_bShowArrows );
	m_pRightArrowButton->SetVisible( m_bShowArrows );

	OnSliderMoved( 0 );
}
コード例 #23
0
//-----------------------------------------------------------------------------
// Purpose: 
//-----------------------------------------------------------------------------
void CControlPointIcon::ApplySchemeSettings( IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );

	if ( !m_pCapHighlightImage )
	{
		m_pCapHighlightImage = new CControlPointIconSwoop( this, "CapHighlightImage" );
		m_pCapHighlightImage->SetParent( g_pClientMode->GetViewport() );
		m_pCapHighlightImage->SetZPos( 10 );
		m_pCapHighlightImage->SetShouldScaleImage( true );
	}

	if ( !m_pCapPulseImage )
	{
		m_pCapPulseImage = new CControlPointIconCapturePulse( this, "CapPulse" );
		m_pCapPulseImage->SetParent( g_pClientMode->GetViewport() );
		m_pCapPulseImage->SetZPos( -1 );
		m_pCapPulseImage->SetVisible( false );
		m_pCapPulseImage->SetShouldScaleImage( true );
	}

	if ( !m_pBaseImage )
	{
		m_pBaseImage = new CControlPointIconPulseable( this, "BaseImage", m_iCPIndex );
		m_pBaseImage->SetShouldScaleImage( true );
	}

	if ( !m_pCapImage )
	{
		m_pCapImage = new CControlPointIconCapArrow( this, this, "CapImage" );
		m_pCapImage->SetZPos( 2 );
		m_pCapImage->SetVisible( false );
	}

	LoadControlSettings( "resource/UI/ControlPointIcon.res" );

	m_pCapPlayerImage = dynamic_cast<vgui::ImagePanel *>( FindChildByName("CapPlayerImage") );
	m_pCapNumPlayers = dynamic_cast<vgui::Label *>( FindChildByName("CapNumPlayers") );
	m_pOverlayImage = dynamic_cast<vgui::ImagePanel *>( FindChildByName("OverlayImage") );

	UpdateImage();
	UpdateCapImage();
}
コード例 #24
0
void CReplayListPanel::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );

	LoadControlSettings( "resource/ui/replaybrowser/replaylistpanel.res", "GAME" );

#if !defined( TF_CLIENT_DLL )
	SetPaintBorderEnabled( false );
#endif

	MoveScrollBarToTop();

	vgui::ScrollBar *pScrollBar = dynamic_cast< vgui::ScrollBar * >( FindChildByName( "PanelListPanelVScroll" ) );
	pScrollBar->SetScrollbarButtonsVisible( false );
	Color clrButtonColor = GetSchemeColor( "Yellow", Color( 255, 255, 255, 255 ), pScheme );
	Color clrBgColor = GetSchemeColor( "TanDark", Color( 255, 255, 255, 255 ), pScheme );
	const int nWidth = XRES( 5 );
	pScrollBar->SetSize( nWidth, GetTall() );
	pScrollBar->GetSlider()->SetSize( nWidth, GetTall() );
}
コード例 #25
0
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");
}
コード例 #26
0
//
//	Name: CWebWindow
//	Author: Hekar Khani
//	Description: Web panel for main menu
//	Notes:
//
CWebWindow::CWebWindow( vgui::VPANEL parent ) : vgui::Frame( NULL, "WebWindow" )
{	
	SetParent( parent );
	vgui::HScheme scheme = vgui::scheme()->LoadSchemeFromFile( "resource/SourceScheme.res", "SourceScheme" );
	SetScheme( scheme );
	LoadControlSettings( "resource/ui/WebWindow.res" );
	InvalidateLayout( true, true );

	SetVisible( false );
	SetTitle( "#lf_webwindow_loading", true );
	SetSizeable( true );
	SetMinimizeButtonVisible( true );
	SetMaximizeButtonVisible( true );

	m_LocationBar = NULL;
	m_LocationBar = dynamic_cast< vgui::TextEntry * > ( FindChildByName( "LocationBar", true ) );
	AssertMsg( m_LocationBar, "LocationBar" );

	m_czTitle[0] = '\0';
	m_czURL[0] = '\0';
}
コード例 #27
0
CSheet_Array::CSheet_Array(CBaseNode *pNode, CNodeView *view, KeyValues *data, Panel *parent )
	: BaseClass( pNode, view, data, parent )
{
	SetParent( parent );

	m_pTEntry_Size_X = new TextEntry( this, "asize_x" );
	m_pTEntry_Size_Y = new TextEntry( this, "asize_y" );
	m_pTEntry_Gauss_Bias = new TextEntry( this, "gauss_bias" );
	m_pTEntry_Random_Min = new TextEntry( this, "ran_min" );
	m_pTEntry_Random_Max = new TextEntry( this, "ran_max" );
	m_pCBox_Datatype = new ComboBox( this, "cbox_datatype", 10, false );
	for ( int i = 0; i < 4; i++ )
		m_pCBox_Datatype->AddItem( ::GetVarTypeName( i ), NULL );

	m_pArrayPanel = new PanelListPanel( this, "array_panel" );

	LoadControlSettings( "shadereditorui/vgui/sheet_array.res" );

	m_pTEntry_Random_Min->SetText( "0" );
	m_pTEntry_Random_Max->SetText( "1" );
}
コード例 #28
0
void CNB_Mission_Summary::ApplySchemeSettings( vgui::IScheme *pScheme )
{
	BaseClass::ApplySchemeSettings( pScheme );
	
	LoadControlSettings( "resource/ui/nb_mission_summary.res" );

	color32 blue;
	blue.r = 83;
	blue.g = 148;
	blue.b = 192;
	blue.a = 255;

	color32 white;
	white.r = 255;
	white.g = 255;
	white.b = 255;
	white.a = 255;
	m_pDetailsButton->SetImage( CBitmapButton::BUTTON_ENABLED, "vgui/swarm/Computer/IconFiles", blue );
	m_pDetailsButton->SetImage( CBitmapButton::BUTTON_ENABLED_MOUSE_OVER, "vgui/swarm/Computer/IconFiles", white );
	m_pDetailsButton->SetImage( CBitmapButton::BUTTON_PRESSED, "vgui/swarm/Computer/IconFiles", white );
}
コード例 #29
0
//-----------------------------------------------------------------------------
// Purpose: Constructor
//-----------------------------------------------------------------------------
CLoadingDiscPanel::CLoadingDiscPanel( vgui::VPANEL parent ) : BaseClass( NULL, "CLoadingDiscPanel" )
{
    int w, h;
    w = ScreenWidth();
    h = ScreenHeight();

    SetParent( parent );
    SetProportional( true );
    SetScheme( "ClientScheme" );
    SetVisible( false );
    SetCursor( NULL );

    m_pLoadingLabel = vgui::SETUP_PANEL(new vgui::Label( this, "LoadingLabel", "" ));
    m_pLoadingLabel->SetPaintBackgroundEnabled( false );

    LoadControlSettings( "resource/LoadingDiscPanel.res" );

    // center the dialog
    int wide, tall;
    GetSize( wide, tall );
    SetPos( ( w - wide ) / 2, ( h - tall ) / 2 );
}
コード例 #30
0
CShaderPrecache::CShaderPrecache( vgui::Panel *parent, CNodeView *nodeview ) : BaseClass( parent, nodeview, "shaderpreview" )
{
	m_pPanelList_Shader = new PanelListPanel( this, "shaderlist" );
	m_pPanelList_Shader->SetFirstColumnWidth( 300 );

	m_pCheck_ReloadCache = new CheckButton( this, "check_reloadcache", "Reload cache on close" );

	LoadControlSettings("shadereditorui/vgui/shadereditor_shaderprecache.res");

	SetTitle("Shader precache",true);

	SetAutoDelete( true );
	SetSizeable(false);

	int sx, sy;
	surface()->GetScreenSize( sx, sy );
	SetSize( 480, sy * 0.8f );

	DoModal();

	LoadList();
}