0x0043454F
| 627 | |
| 628 | // 0x0043454F |
| 629 | Window* open(CompanyId companyId) |
| 630 | { |
| 631 | auto window = WindowManager::bringToFront(WindowType::company, enumValue(companyId)); |
| 632 | if (window != nullptr) |
| 633 | { |
| 634 | if (ToolManager::isToolActive(window->type, window->number)) |
| 635 | { |
| 636 | ToolManager::toolCancel(); |
| 637 | window = WindowManager::bringToFront(WindowType::company, enumValue(companyId)); |
| 638 | } |
| 639 | } |
| 640 | |
| 641 | if (window == nullptr) |
| 642 | { |
| 643 | window = create(companyId); |
| 644 | } |
| 645 | |
| 646 | window->currentTab = 0; |
| 647 | window->width = Status::kWindowSize.width; |
| 648 | window->height = Status::kWindowSize.height; |
| 649 | window->invalidate(); |
| 650 | |
| 651 | window->setWidgets(Status::widgets); |
| 652 | window->holdableWidgets = 0; |
| 653 | window->eventHandlers = &Status::getEvents(); |
| 654 | window->activatedWidgets = 0; |
| 655 | |
| 656 | Common::disableChallengeTab(window); |
| 657 | window->initScrollWidgets(); |
| 658 | window->moveInsideScreenEdges(); |
| 659 | |
| 660 | return window; |
| 661 | } |
| 662 | |
| 663 | // 0x00435ACC |
| 664 | Window* openAndSetName() |
no test coverage detected