| 226 | } |
| 227 | |
| 228 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 229 | { |
| 230 | switch (widget) { |
| 231 | case WID_BBS_DROPDOWN_ORDER: |
| 232 | this->DrawSortButtonState(widget, this->bridges.IsDescSortOrder() ? SBS_DOWN : SBS_UP); |
| 233 | break; |
| 234 | |
| 235 | case WID_BBS_BRIDGE_LIST: { |
| 236 | Rect tr = r.WithHeight(this->resize.step_height).Shrink(WidgetDimensions::scaled.matrix); |
| 237 | bool rtl = _current_text_dir == TD_RTL; |
| 238 | auto [first, last] = this->vscroll->GetVisibleRangeIterators(this->bridges); |
| 239 | for (auto it = first; it != last; ++it) { |
| 240 | const BridgeSpec *b = it->spec; |
| 241 | DrawSpriteIgnorePadding(b->sprite, b->pal, tr.WithWidth(this->icon_width, rtl), SA_HOR_CENTER | SA_BOTTOM); |
| 242 | DrawStringMultiLineWithClipping(tr.Indent(this->icon_width + WidgetDimensions::scaled.hsep_normal, rtl), GetBridgeSelectString(*it)); |
| 243 | tr = tr.Translate(0, this->resize.step_height); |
| 244 | } |
| 245 | break; |
| 246 | } |
| 247 | } |
| 248 | } |
| 249 | |
| 250 | EventState OnKeyPress([[maybe_unused]] char32_t key, uint16_t keycode) override |
| 251 | { |
nothing calls this directly
no test coverage detected