| 315 | } |
| 316 | |
| 317 | bool DisplayArcadeWaypoint::CanDestroy() |
| 318 | { |
| 319 | if (_exit != IDC_OK) |
| 320 | { |
| 321 | return true; |
| 322 | } |
| 323 | |
| 324 | GameState* gstate = GWorld->GetGameState(); |
| 325 | |
| 326 | CEdit* edit = dynamic_cast<CEdit*>(GetCtrl(IDC_ARCWP_EXPCOND)); |
| 327 | if (edit) |
| 328 | { |
| 329 | if (!gstate->CheckEvaluateBool(edit->GetText())) |
| 330 | { |
| 331 | FocusCtrl(IDC_ARCWP_EXPCOND); |
| 332 | CreateMsgBox(MB_BUTTON_OK, gstate->GetLastErrorText()); |
| 333 | edit->SetCaretPos(gstate->GetLastErrorPos()); |
| 334 | return false; |
| 335 | } |
| 336 | } |
| 337 | |
| 338 | edit = dynamic_cast<CEdit*>(GetCtrl(IDC_ARCWP_EXPACTIV)); |
| 339 | if (edit) |
| 340 | { |
| 341 | if (!gstate->CheckExecute(edit->GetText())) |
| 342 | { |
| 343 | FocusCtrl(IDC_ARCWP_EXPACTIV); |
| 344 | CreateMsgBox(MB_BUTTON_OK, gstate->GetLastErrorText()); |
| 345 | edit->SetCaretPos(gstate->GetLastErrorPos()); |
| 346 | return false; |
| 347 | } |
| 348 | } |
| 349 | |
| 350 | return true; |
| 351 | } |
| 352 | |
| 353 | void DisplayArcadeWaypoint::Destroy() |
| 354 | { |
nothing calls this directly
no test coverage detected