================ DialogEntityDefEditor::LoadDecl ================ */
| 167 | ================ |
| 168 | */ |
| 169 | void DialogEntityDefEditor::LoadDecl( idDeclEntityDef *decl ) { |
| 170 | int numLines = 0; |
| 171 | CRect rect; |
| 172 | |
| 173 | this->decl = decl; |
| 174 | |
| 175 | // Fill up the spawnclass box with all spawn classes |
| 176 | /* |
| 177 | idTypeInfo *c = idClass::GetClass("idClass"); |
| 178 | for (; c; c = c->next) { |
| 179 | spawnclassCombo.AddString(c->classname); |
| 180 | } |
| 181 | */ |
| 182 | |
| 183 | // Fill up the inherit box with all entitydefs |
| 184 | int numDecls = declManager->GetNumDecls(DECL_ENTITYDEF); |
| 185 | for (int i=0; i<numDecls; i++) { |
| 186 | const idDecl *d = declManager->DeclByIndex(DECL_ENTITYDEF, i, false); |
| 187 | if (d) { |
| 188 | inheritCombo.AddString(d->GetName()); |
| 189 | } |
| 190 | } |
| 191 | |
| 192 | firstLine = decl->GetLineNum(); |
| 193 | |
| 194 | char *declText = (char *)_alloca( ( decl->GetTextLength() + 1 ) * sizeof( char ) ); |
| 195 | decl->GetText( declText ); |
| 196 | |
| 197 | PopulateLists( declText ); |
| 198 | |
| 199 | SetWindowText( va( "EntityDef Editor (%s, line %d)", decl->GetFileName(), decl->GetLineNum() ) ); |
| 200 | |
| 201 | // Hack to get it to reflow the window |
| 202 | GetWindowRect( rect ); |
| 203 | rect.bottom++; |
| 204 | MoveWindow( rect ); |
| 205 | |
| 206 | testButton.EnableWindow( FALSE ); |
| 207 | okButton.EnableWindow( FALSE ); |
| 208 | |
| 209 | UpdateStatusBar(); |
| 210 | } |
| 211 | |
| 212 | /* |
| 213 | ================= |
nothing calls this directly
no test coverage detected