| 216 | } |
| 217 | |
| 218 | Point OnInitialPosition([[maybe_unused]] int16_t sm_width, [[maybe_unused]] int16_t sm_height, [[maybe_unused]] int window_number) override |
| 219 | { |
| 220 | /* Position the window so hopefully the first bridge from the list is under the mouse pointer. */ |
| 221 | NWidgetBase *list = this->GetWidget<NWidgetBase>(WID_BBS_BRIDGE_LIST); |
| 222 | Point corner; // point of the top left corner of the window. |
| 223 | corner.y = Clamp(_cursor.pos.y - list->pos_y - 5, GetMainViewTop(), GetMainViewBottom() - sm_height); |
| 224 | corner.x = Clamp(_cursor.pos.x - list->pos_x - 5, 0, _screen.width - sm_width); |
| 225 | return corner; |
| 226 | } |
| 227 | |
| 228 | void DrawWidget(const Rect &r, WidgetID widget) const override |
| 229 | { |
nothing calls this directly
no test coverage detected