| 545 | } |
| 546 | |
| 547 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 548 | { |
| 549 | DrawPixelInfo tmp_dpi; |
| 550 | |
| 551 | switch (widget) { |
| 552 | case WID_BDD_X: |
| 553 | case WID_BDD_Y: { |
| 554 | Axis axis = widget == WID_BDD_X ? AXIS_X : AXIS_Y; |
| 555 | |
| 556 | Rect ir = r.Shrink(WidgetDimensions::scaled.bevel); |
| 557 | if (FillDrawPixelInfo(&tmp_dpi, ir)) { |
| 558 | AutoRestoreBackup dpi_backup(_cur_dpi, &tmp_dpi); |
| 559 | int x = (ir.Width() - ScaleSpriteTrad(96)) / 2; |
| 560 | int y = (ir.Height() - ScaleSpriteTrad(64)) / 2; |
| 561 | int x1 = ScaleSpriteTrad(63); |
| 562 | int x2 = ScaleSpriteTrad(31); |
| 563 | DrawShipDepotSprite(x + (axis == AXIS_X ? x1 : x2), y + ScaleSpriteTrad(17), axis, DepotPart::North); |
| 564 | DrawShipDepotSprite(x + (axis == AXIS_X ? x2 : x1), y + ScaleSpriteTrad(33), axis, DepotPart::South); |
| 565 | } |
| 566 | break; |
| 567 | } |
| 568 | } |
| 569 | } |
| 570 | |
| 571 | void OnClick([[maybe_unused]] Point pt, WidgetID widget, [[maybe_unused]] int click_count) override |
| 572 | { |
nothing calls this directly
no test coverage detected