Skip to main content

layout_gizmos

Function layout_gizmos 

Source
pub fn layout_gizmos<U: MapUnit>(
    scene: &MapScene<U>,
    grid: &Grid,
    out: &mut Gizmos,
)
Expand description

Hands in the GRID channel’s gizmos for scene laid out as grid (its skin’s GridSkin::grid), in this order:

  • the cell lines inside the view: each column’s and row’s first pixel, and the view’s last (GizmoRole::Bounds);
  • the map’s bounds, where they are on screen: round the tiles of the view that are on the map (Bounds);
  • the cursor’s cell (GizmoRole::Note);
  • each unit’s cell, and its index in scene.units as a label in the cell holding the tile’s top-right pixel (Note);
  • each edge the map goes on past (MapScene::more): a line along that side of the view (Note).

Everything lies inside the view and the frame (Gizmos::frame); a cell the frame cuts is outlined where it is cut. Nothing is built while the channel is off.