MCPcopy Create free account
hub / github.com/dhewm/dhewm3 / LoadFile

Method LoadFile

neo/tools/af/DialogAF.cpp:110–130  ·  view source on GitHub ↗

================ DialogAF::LoadFile ================ */

Source from the content-addressed store, hash-verified

108================
109*/
110void DialogAF::LoadFile( idDeclAF *af ) {
111 file = af;
112 propertiesDlg->LoadFile( af );
113 bodyDlg->LoadFile( af );
114 constraintDlg->LoadFile( af );
115
116 if ( file ) {
117 // select file in AFList
118 int i = AFList.FindString( -1, file->GetName() );
119 if ( i != AFList.GetCurSel() ) {
120 AFList.SetCurSel( i );
121 }
122 GetDlgItem( IDC_BUTTON_AF_SAVE )->EnableWindow( file->modified );
123 GetDlgItem( IDC_BUTTON_AF_DELETE )->EnableWindow( true );
124 }
125 else {
126 AFList.SetCurSel( -1 );
127 GetDlgItem( IDC_BUTTON_AF_SAVE )->EnableWindow( false );
128 GetDlgItem( IDC_BUTTON_AF_DELETE )->EnableWindow( false );
129 }
130}
131
132/*
133================

Callers 5

InitScriptEventsMethod · 0.45
AFEditorInitFunction · 0.45
FromFileMethod · 0.45
LoadMethod · 0.45
LoadKeyWordsFromFileMethod · 0.45

Calls 3

GetCurSelMethod · 0.80
SetCurSelMethod · 0.80
GetNameMethod · 0.45

Tested by

no test coverage detected