| 445 | } |
| 446 | |
| 447 | void onUpdate() override |
| 448 | { |
| 449 | if (_info.Desc.Tabs.size() > static_cast<size_t>(page)) |
| 450 | { |
| 451 | const auto& tab = _info.Desc.Tabs[page]; |
| 452 | if (tab.imageFrameCount != 0) |
| 453 | { |
| 454 | currentFrame++; |
| 455 | if (currentFrame >= tab.imageFrameCount * tab.imageFrameDuration) |
| 456 | { |
| 457 | currentFrame = 0; |
| 458 | } |
| 459 | |
| 460 | invalidateWidget(WIDX_TAB_0 + this->page); |
| 461 | } |
| 462 | } |
| 463 | |
| 464 | InvokeEventHandler(_info.Owner, _info.Desc.OnUpdate); |
| 465 | |
| 466 | // Since the plugin may alter widget positions and sizes during an update event, |
| 467 | // we need to force an update for all list view scrollbars |
| 468 | WidgetIndex widgetIndex = 0; |
| 469 | for (auto& widget : widgets) |
| 470 | { |
| 471 | if (widget.type == WidgetType::scroll) |
| 472 | { |
| 473 | widgetScrollUpdateThumbs(*this, widgetIndex); |
| 474 | } |
| 475 | widgetIndex++; |
| 476 | } |
| 477 | |
| 478 | UpdateViewport(); |
| 479 | } |
| 480 | |
| 481 | void onPrepareDraw() override |
| 482 | { |
nothing calls this directly
no test coverage detected