//----------------------------------------------------------------------------- // 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 ); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseActionTextMessageStartDialog::Init( void ) { LoadControlSettings( "resource\\BaseActionTextMessageStartDialog.res" ); BaseClass::Init(); client_textmessage_t *tm = GetAction()->GetTextMessage(); m_pX->SetText( va( "%f", tm->x ) ); m_pY->SetText( va( "%f", tm->y ) ); m_pFadeInTime->SetText( va( "%.3f", tm->fadein ) ); m_pFadeOutTime->SetText( va( "%.3f", tm->fadeout ) ); m_pHoldTime->SetText( va( "%.3f", tm->holdtime ) ); m_pFXTime->SetText( va( "%.3f", tm->fxtime ) ); m_pColor1->SetText( va( "%i %i %i %i", tm->r1, tm->g1, tm->b1, tm->a1 ) ); m_pColor2->SetText( va( "%i %i %i %i", tm->r2, tm->g2, tm->b2, tm->a2 ) ); m_pMessageText->SetText( GetAction()->GetMessageText() ); FillInFonts(); m_pFontName->SetText( GetAction()->GetFontName() ); int c = NUM_EFFECT_TYPES; int i; for ( i = 0; i < c ; i++ ) { m_pEffectType->AddItem( NameForEffectType( i ), NULL ); } m_pEffectType->SetText( NameForEffectType( tm->effect ) ); }
//----------------------------------------------------------------------------- // 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 ); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseActionWithStopTimeDialog::Init( void ) { BaseClass::Init(); if ( GetAction()->m_bUsingStopFrame ) { m_pStopType->SetText( "TimeUseFrame" ); m_pStop->SetText( va( "%i", GetAction()->m_nStopFrame ) ); } else { m_pStopType->SetText( "TimeUseClock" ); m_pStop->SetText( va( "%.3f", GetAction()->m_flStopTime ) ); } }
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( ); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseActionCDTrackStartDialog::Init( void ) { LoadControlSettings( "resource\\BaseActionCDTrackStartDialog.res" ); BaseClass::Init(); m_pTrackNumber->SetText( va( "%i", GetAction()->GetTrack() ) ); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseActionPlayCommandsDialog::Init( void ) { LoadControlSettings( "resource\\BaseActionPlayCommandsDialog.res" ); BaseClass::Init(); m_pCommands->SetText( GetAction()->GetCommandStream() ); }
//----------------------------------------------------------------------------- // 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 ) ); } }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseActionPlaySoundStartDialog::Init( void ) { LoadControlSettings( "resource\\BaseActionPlaySoundStartDialog.res" ); BaseClass::Init(); m_pSoundName->SetText( GetAction()->GetSoundName() ); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseActionPauseDialog::Init( void ) { LoadControlSettings( "resource\\BaseActionPauseDialog.res" ); BaseClass::Init(); m_pPauseTime->SetText( va( "%f", GetAction()->GetPauseTime() ) ); }
//----------------------------------------------------------------------------- // Purpose: //----------------------------------------------------------------------------- void CBaseActionChangePlaybackRateDialog::Init( void ) { LoadControlSettings( "resource\\BaseActionPlaybackRateDialog.res" ); BaseClass::Init(); m_pRate->SetText( va( "%f", GetAction()->GetPlaybackRate() ) ); }
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(); } }