本文整理汇总了C++中vgui::TextEntry::GetText方法的典型用法代码示例。如果您正苦于以下问题:C++ TextEntry::GetText方法的具体用法?C++ TextEntry::GetText怎么用?C++ TextEntry::GetText使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类vgui::TextEntry
的用法示例。
在下文中一共展示了TextEntry::GetText方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。
示例1: OnSaveChanges
//-----------------------------------------------------------------------------
// Purpose:
// Output : Returns true if changes were effected
//-----------------------------------------------------------------------------
bool CBaseActionZoomDialog::OnSaveChanges( void )
{
bool bret = BaseClass::OnSaveChanges();
char sz[ 512 ];
m_pFinalFOV->GetText( sz, sizeof( sz ) );
float f = (float)atof( sz );
if ( GetAction()->m_flFinalFOV != f )
{
bret = true;
GetAction()->m_flFinalFOV = f;
}
m_pOutRate->GetText( sz, sizeof( sz ) );
f = (float)atof( sz );
if ( GetAction()->m_flFOVRateOut != f )
{
bret = true;
GetAction()->m_flFOVRateOut = f;
}
m_pInRate->GetText( sz, sizeof( sz ) );
f = (float)atof( sz );
if ( GetAction()->m_flFOVRateIn != f )
{
bret = true;
GetAction()->m_flFOVRateIn = f;
}
m_pHoldTime->GetText( sz, sizeof( sz ) );
f = (float)atof( sz );
if ( GetAction()->m_flHoldTime != f )
{
bret = true;
GetAction()->m_flHoldTime = f;
}
if ( m_pSpline->IsSelected() != GetAction()->m_bSpline )
{
bret = true;
GetAction()->m_bSpline = m_pSpline->IsSelected();
}
if ( m_pStayout->IsSelected() != GetAction()->m_bStayout )
{
bret = true;
GetAction()->m_bStayout = m_pStayout->IsSelected();
}
return bret;
}
示例2: OnSaveChanges
//-----------------------------------------------------------------------------
// Purpose:
// Output : Returns true if changes were effected
//-----------------------------------------------------------------------------
bool CBaseActionSkipAheadDialog::OnSaveChanges( void )
{
bool bret = BaseClass::OnSaveChanges();
char skiptype[ 512 ];
m_pSkipType->GetText( skiptype, sizeof( skiptype ) );
char skipto[ 512 ];
m_pSkip->GetText( skipto, sizeof( skipto ) );
float fskip = (float)atof( skipto );
int iskip = (int)atoi( skipto );
if ( !Q_strcasecmp( skiptype, "TimeUseTick" ) )
{
if ( GetAction()->m_nSkipToTick != iskip )
{
bret = true;
GetAction()->SetSkipToTick( iskip );
GetAction()->SetSkipToTime( -1.0f );
}
}
else
{
if ( GetAction()->m_flSkipToTime != fskip )
{
bret = true;
GetAction()->SetSkipToTime( fskip );
GetAction()->SetSkipToTick( -1 );
}
}
return bret;
}
示例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: OnCommand
//-----------------------------------------------------------------------------
// command handler
//-----------------------------------------------------------------------------
void CAddPresetDialog::OnCommand( const char *command )
{
if ( !Q_stricmp( command, "OK" ) )
{
int nTextLength = m_pInput->GetTextLength() + 1;
char* txt = (char*)_alloca( nTextLength * sizeof(char) );
m_pInput->GetText( txt, nTextLength );
nTextLength = m_pPresetGroup->GetTextLength() + 1;
char* pPresetGroupName = (char*)_alloca( nTextLength * sizeof(char) );
m_pPresetGroup->GetText( pPresetGroupName, nTextLength );
KeyValues *pCurrentGroup = m_pPresetGroup->GetActiveItemUserData();
CDmePresetGroup *pPresetGroup = pCurrentGroup ? GetElementKeyValue<CDmePresetGroup>( pCurrentGroup, "presetGroup" ) : NULL;
if ( pPresetGroup && Q_stricmp( pPresetGroup->GetName(), pPresetGroupName ) )
{
pPresetGroup = NULL;
}
KeyValues *kv = new KeyValues( "PresetNameSelected", "text", txt );
kv->SetString( "presetGroupName", pPresetGroupName );
SetElementKeyValue( kv, "presetGroup", pPresetGroup );
if ( m_pContextKeyValues )
{
kv->AddSubKey( m_pContextKeyValues );
m_pContextKeyValues = NULL;
}
PostActionSignal( kv );
CloseModal();
return;
}
if ( !Q_stricmp( command, "Cancel") )
{
CloseModal();
return;
}
BaseClass::OnCommand( command );
}