* Select which plane to show (for #NWID_SELECTION only). * @param plane Plane number to display. * @return true iff the shown plane changed. */
| 1448 | * @return true iff the shown plane changed. |
| 1449 | */ |
| 1450 | bool NWidgetStacked::SetDisplayedPlane(int plane) |
| 1451 | { |
| 1452 | if (this->shown_plane == plane) return false; |
| 1453 | this->shown_plane = plane; |
| 1454 | /* In case widget IDs are repeated, make sure Window::GetWidget works on displayed widgets. */ |
| 1455 | if (static_cast<size_t>(this->shown_plane) < this->children.size()) this->children[shown_plane]->FillWidgetLookup(*this->widget_lookup); |
| 1456 | return true; |
| 1457 | } |
| 1458 | |
| 1459 | class NWidgetLayer : public NWidgetContainer { |
| 1460 | public: |
no test coverage detected