| 811 | const Action5Type *act5_type = nullptr; ///< Sprite Area of current selected sprite. |
| 812 | |
| 813 | SpriteAlignerWindow(WindowDesc &desc, WindowNumber wno) : Window(desc) |
| 814 | { |
| 815 | /* On first opening, set initial zoom to current zoom level. */ |
| 816 | if (SpriteAlignerWindow::zoom == ZoomLevel::End) SpriteAlignerWindow::zoom = _gui_zoom; |
| 817 | SpriteAlignerWindow::zoom = Clamp(SpriteAlignerWindow::zoom, _settings_client.gui.zoom_min, _settings_client.gui.zoom_max); |
| 818 | |
| 819 | /* Oh yes, we assume there is at least one normal sprite! */ |
| 820 | while (GetSpriteType(this->current_sprite) != SpriteType::Normal) this->current_sprite++; |
| 821 | this->SelectAction5Type(); |
| 822 | |
| 823 | this->CreateNestedTree(); |
| 824 | this->vscroll = this->GetScrollbar(WID_SA_SCROLLBAR); |
| 825 | this->vscroll->SetCount(_newgrf_debug_sprite_picker.sprites.size()); |
| 826 | this->FinishInitNested(wno); |
| 827 | |
| 828 | this->SetWidgetLoweredState(WID_SA_CENTRE, SpriteAlignerWindow::centre); |
| 829 | this->SetWidgetLoweredState(WID_SA_CROSSHAIR, SpriteAlignerWindow::crosshair); |
| 830 | |
| 831 | this->InvalidateData(0, true); |
| 832 | } |
| 833 | |
| 834 | std::string GetWidgetString(WidgetID widget, StringID stringid) const override |
| 835 | { |
nothing calls this directly
no test coverage detected