本文整理汇总了C++中vgui::TextEntry::SetText方法的典型用法代码示例。如果您正苦于以下问题:C++ TextEntry::SetText方法的具体用法?C++ TextEntry::SetText怎么用?C++ TextEntry::SetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vgui::TextEntry
的用法示例。
在下文中一共展示了TextEntry::SetText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: Init
//-----------------------------------------------------------------------------
// Purpose:
//-----------------------------------------------------------------------------
void CBaseActionScreenFadeStartDialog::Init( void )
{
LoadControlSettings( "resource\\BaseActionScreenFadeStartDialog.res" );
BaseClass::Init();
ScreenFade_t const *f = GetAction()->GetScreenFade();
float duration = f->duration * (1.0f/(float)(1<<SCREENFADE_FRACBITS));
float holdTime = f->holdTime * (1.0f/(float)(1<<SCREENFADE_FRACBITS));
int fadein = f->fadeFlags & FFADE_IN;
int fadeout = f->fadeFlags & FFADE_OUT;
int fademodulate = f->fadeFlags & FFADE_MODULATE;
int fadestayout = f->fadeFlags & FFADE_STAYOUT;
int fadepurge = f->fadeFlags & FFADE_PURGE;
int r = f->r;
int g = f->g;
int b = f->b;
int a = f->a;
m_pDuration->SetText( va( "%.3f", duration ) );
m_pHoldTime->SetText( va( "%.3f", holdTime ) );
m_pColor->SetText( va( "%i %i %i %i", r, g, b, a ) );
m_pFFADE_IN->SetSelected( fadein );
m_pFFADE_OUT->SetSelected( fadeout );
m_pFFADE_MODULATE->SetSelected( fademodulate );
m_pFFADE_STAYOUT->SetSelected( fadestayout );
m_pFFADE_PURGE->SetSelected( fadepurge );
}
示例2: Init
//-----------------------------------------------------------------------------
// 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 );
}
示例3: DoModal
void CAddPresetDialog::DoModal( CDmeAnimationSet *pAnimationSet, KeyValues *pContextKeyValues )
{
int nTextLength = m_pInput->GetTextLength() + 1;
char* pCurrentGroupName = (char*)_alloca( nTextLength * sizeof(char) );
m_pInput->GetText( pCurrentGroupName, nTextLength );
m_pPresetGroup->DeleteAllItems();
// Populate the combo box with preset group names
CDmrElementArray< CDmePresetGroup > presetGroupList = pAnimationSet->GetPresetGroups();
int nCount = presetGroupList.Count();
for ( int i = 0; i < nCount; ++i )
{
CDmePresetGroup *pPresetGroup = presetGroupList[i];
if ( pPresetGroup->m_bIsReadOnly )
continue;
KeyValues *kv = new KeyValues( "entry" );
SetElementKeyValue( kv, "presetGroup", pPresetGroup );
int nItemID = m_pPresetGroup->AddItem( pPresetGroup->GetName(), kv );
if ( pCurrentGroupName && !Q_stricmp( pPresetGroup->GetName(), pCurrentGroupName ) )
{
m_pPresetGroup->ActivateItem( nItemID );
}
}
BaseClass::DoModal( pContextKeyValues );
m_pInput->SetText( "" );
m_pInput->RequestFocus();
PlaceUnderCursor( );
}
示例4: OnFileSelected
void CBaseActionPlaySoundStartDialog::OnFileSelected( char const *fullpath )
{
if ( !fullpath || !fullpath[ 0 ] )
return;
char relativepath[ 512 ];
g_pFileSystem->FullPathToRelativePath( fullpath, relativepath );
COM_FixSlashes( relativepath );
char *soundname = relativepath;
if ( !Q_strnicmp( relativepath, "sound\\", strlen( "sound\\" ) ) )
{
soundname += strlen( "sound\\" );
}
m_pSoundName->SetText( soundname );
if ( m_hFileOpenDialog )
{
m_hFileOpenDialog->MarkForDeletion();
}
}