------------------------------------------------- MENU HOOK ------------------------------------------------
| 410 | } |
| 411 | //------------------------------------------------- MENU HOOK ------------------------------------------------ |
| 412 | void __stdcall DrawDialogHook(BW::Bitmap *pSurface, BW::bounds *pBounds) |
| 413 | { |
| 414 | if ( BW::pOldDrawDialogProc ) |
| 415 | BW::pOldDrawDialogProc(pSurface, pBounds); |
| 416 | |
| 417 | if ( BW::BWDATA::gwGameMode == BW::GAME_GLUES ) |
| 418 | BWAPI::BroodwarImpl.onMenuFrame(); |
| 419 | |
| 420 | BW::dialog *timeout = BW::FindDialogGlobal("TimeOut"); |
| 421 | if ( timeout ) |
| 422 | { |
| 423 | BW::dialog *dropbtn = timeout->findIndex(2); |
| 424 | if ( !dropbtn->isDisabled() && BWAPI::BroodwarImpl.wantDropPlayers ) |
| 425 | BWAPI::BroodwarImpl.dropPlayers(); |
| 426 | } |
| 427 | |
| 428 | // WMODE config option |
| 429 | if ( switchToWMode && ghMainWnd ) |
| 430 | { |
| 431 | switchToWMode = false; |
| 432 | SetWMode(windowRect.right, windowRect.bottom, true); |
| 433 | } |
| 434 | |
| 435 | //click the menu dialog that pops up when you win/lose a game |
| 436 | BW::dialog *endDialog = BW::FindDialogGlobal("LMission"); |
| 437 | if ( !endDialog ) |
| 438 | endDialog = BW::FindDialogGlobal("WMission"); |
| 439 | if ( endDialog ) |
| 440 | endDialog->findIndex(-2)->activate(); |
| 441 | } |
| 442 | |
| 443 | //--------------------------------------------- OPEN FILE HOOK ----------------------------------------------- |
| 444 | std::string lastFile; |
nothing calls this directly
no test coverage detected