Parameters: window - the window to get rid of
| 538 | |
| 539 | // Parameters: window - the window to get rid of |
| 540 | void CloseSmallView(int window) { |
| 541 | // Mark the window as inactive |
| 542 | if (Small_views[window].objhandle == Guided_missile_objhandle) { |
| 543 | // mark guided missile small view as inactive. |
| 544 | Guided_missile_objhandle = OBJECT_HANDLE_NONE; |
| 545 | Guided_missile_smallview = false; |
| 546 | } |
| 547 | |
| 548 | Small_views[window].objhandle = OBJECT_HANDLE_NONE; |
| 549 | |
| 550 | // Restore old view if there was one |
| 551 | if (Small_views_save[window].objhandle != OBJECT_HANDLE_NONE) { |
| 552 | Small_views[window] = Small_views_save[window]; |
| 553 | Small_views_save[window].objhandle = OBJECT_HANDLE_NONE; |
| 554 | } else { |
| 555 | Clear_screen = 4; // force background redraw |
| 556 | |
| 557 | if (window == SVW_LEFT) |
| 558 | Disable_primary_monitor = 0; |
| 559 | else if (window == SVW_RIGHT) |
| 560 | Disable_secondary_monitor = 0; |
| 561 | } |
| 562 | } |
| 563 | |
| 564 | // Get rid of a small view if it's a popup window |
| 565 | // Parameters: window - the window to get rid of |
no outgoing calls
no test coverage detected