0x004345EE
| 2197 | |
| 2198 | // 0x004345EE |
| 2199 | Window* openFinances(CompanyId companyId) |
| 2200 | { |
| 2201 | auto window = WindowManager::bringToFront(WindowType::company, enumValue(companyId)); |
| 2202 | if (window != nullptr) |
| 2203 | { |
| 2204 | if (ToolManager::isToolActive(window->type, window->number)) |
| 2205 | { |
| 2206 | ToolManager::toolCancel(); |
| 2207 | window = WindowManager::bringToFront(WindowType::company, enumValue(companyId)); |
| 2208 | } |
| 2209 | } |
| 2210 | |
| 2211 | if (window == nullptr) |
| 2212 | { |
| 2213 | window = create(companyId); |
| 2214 | } |
| 2215 | |
| 2216 | window->currentTab = Common::tab_finances - Common::tab_status; |
| 2217 | window->width = Finances::kWindowSize.width; |
| 2218 | window->height = Finances::kWindowSize.height; |
| 2219 | window->invalidate(); |
| 2220 | |
| 2221 | window->setWidgets(Finances::widgets); |
| 2222 | window->holdableWidgets = Finances::holdableWidgets; |
| 2223 | window->eventHandlers = &Finances::getEvents(); |
| 2224 | window->activatedWidgets = 0; |
| 2225 | |
| 2226 | Common::disableChallengeTab(window); |
| 2227 | window->initScrollWidgets(); |
| 2228 | window->moveInsideScreenEdges(); |
| 2229 | Finances::scrollToLatestData(*window); |
| 2230 | |
| 2231 | return window; |
| 2232 | } |
| 2233 | |
| 2234 | namespace CargoDelivered |
| 2235 | { |
no test coverage detected