| 394 | } |
| 395 | |
| 396 | void Window_Message::Update() { |
| 397 | aop = {}; |
| 398 | if (IsOpening()) { DebugLog("{}: MSG OPENING"); } |
| 399 | if (IsClosing()) { DebugLog("{}: MSG CLOSING"); } |
| 400 | |
| 401 | close_started_this_frame = false; |
| 402 | close_finished_this_frame = false; |
| 403 | |
| 404 | const bool was_closing = IsClosing(); |
| 405 | |
| 406 | Window_Selectable::Update(); |
| 407 | number_input_window->Update(); |
| 408 | gold_window->Update(); |
| 409 | |
| 410 | if (was_closing && !IsClosing()) { |
| 411 | close_finished_this_frame = true; |
| 412 | } |
| 413 | |
| 414 | if (!IsVisible()) { |
| 415 | return; |
| 416 | } |
| 417 | |
| 418 | if (IsOpeningOrClosing()) { |
| 419 | return; |
| 420 | } |
| 421 | |
| 422 | if (wait_count > 0) { |
| 423 | DebugLog("{}: MSG WAIT {}", wait_count); |
| 424 | --wait_count; |
| 425 | return; |
| 426 | } |
| 427 | |
| 428 | if (GetPause()) { |
| 429 | DebugLog("{}: MSG PAUSE"); |
| 430 | WaitForInput(); |
| 431 | |
| 432 | if (GetPause()) { |
| 433 | return; |
| 434 | } |
| 435 | } |
| 436 | |
| 437 | if (GetIndex() >= 0) { |
| 438 | DebugLog("{}: MSG CHOICE"); |
| 439 | InputChoice(); |
| 440 | if (GetIndex() >= 0) { |
| 441 | return; |
| 442 | } |
| 443 | } |
| 444 | |
| 445 | if (number_input_window->GetActive()) { |
| 446 | DebugLog("{}: MSG NUMBER"); |
| 447 | InputNumber(); |
| 448 | if (number_input_window->GetActive()) { |
| 449 | return; |
| 450 | } |
| 451 | } |
| 452 | |
| 453 | DebugLog("{}: MSG UPD"); |
no test coverage detected